Module B0_memo_cli.Log

B0_memo_log interaction

Log formatters

val pp_stats : hashed_size:bool -> Op.query -> B0_memo_log.t B0_std.Fmt.t

pp_stats sel formats statistics stored in the log using query to select operations that are part of the statistics. If hashed_size the sum of the size of the files in file_hashes is computed (this accesses the file system in a non-fatal way in case of errors).

type format = [
  1. | `Hashed_files
  2. | `Op_hashes
  3. | `Ops
  4. | `Path
  5. | `Stats
  6. | `Root_hashed_files
  7. | `Trace_event
  8. | `Diagnosis
]

The type for output format.

val pp : ?sep:unit B0_std.Fmt.t -> format:format -> output_details:B0_std_cli.output_details -> query:Op.query -> path:B0_std.Fpath.t -> unit -> B0_memo_log.t B0_std.Fmt.t

pp ~format ~output_details quer ~path formats a log as follows:

  • format specifies how the log is rendered.
  • output_details specifies how much details should be rendered.
  • query indicates which operations of the log must be formatted.
  • path is used when `Path is requested (XXX what does that mean ?)
  • sep is formatted at the end iff something is formated. Defaults to B0_std.Fmt.cut.
val format_cli : ?docs:string -> unit -> format Cmdliner.Term.t

out_format_cli ~docs () are mutually exclusive options to specify alternate output formats. docs is the manual section in which options are documented, defaults to s_output_format_options

val s_output_format_options : Cmdliner.Manpage.section_name

s_output_format_options is "OUTPUT FORMAT OPTIONS".

Log file

val filename : string

filename is "_log" the default log file name in the b0 directory.

val file : ?opts:string list -> ?docs:string -> ?doc:string -> ?doc_absent:string -> ?env:Cmdliner.Cmd.Env.info -> unit -> B0_std.Fpath.t option Cmdliner.Term.t

file ~doc_none ~docs ~doc ~env is a cli interface for specifing a memo log file.

  • opts are the cli options to specify it, defaults to ["log-file"].
  • docs is where the option is documented, defaults to Cmdliner.Manpage.s_common_options
  • doc is a doc string.
  • doc_absent describes how the value is determined if the term is evaluates to None.
  • env is a variable that can be used to override the default value, defaults to cache_dir_env.
val file_var : Cmdliner.Cmd.Env.info

file_env is "B0_LOG_FILE".