Sets up a file with the given path, or if split_files_after
is given, creates a directory to store the files. By default the logging will not be time tagged and will be appending to the file / creating more files. If time_tagged
is Clock
, entries will be tagged with a date and clock time; if it is Elapsed
, they will be tagged with the time span elapsed since the start of the process (using Mtime_clock.elapsed
). If split_files_after
is given and for_append
is false, clears the directory. If the opened file exceeds split_files_after
characters, Shared_config.refresh_ch ()
returns true; if in that case Shared_config.debug_ch ()
is called, it will create and return a new file.
If elapsed_times
is different from Not_reported
, the elapsed time spans are printed for log subtrees, in the corresponding units with precision up to 1%. The times include printing out logs, therefore might not be reliable for profiling. In the runtime creation functions, elapsed_times
defaults to Not_reported
.
If print_entry_ids
is true, the entry_id
identifiers are printed on log headers with the syntax {#ID}
; by default they are omitted. If verbose_entry_ids
is true, the entry_id
identifiers are also printed on logged values.
If global_prefix
is given, the log header messages (and the log closing messages for the flushing backend) are prefixed with it.
If table_of_contents_ch
is given or with_table_of_contents=true
, outputs selected log headers to this channel. The provided file name is used as a prefix for links to anchors of the log headers. Note that debug runtime builders that take a channel instead of a file name, will use global_prefix
instead for the anchor links. The setting toc_entry
controls the selection of headers to include in a ToC (it defaults to And []
, which means including all entries).
log_level
, by default 9, specifies Shared_config.init_log_level
. This is the initial log level. In particular, the header "BEGIN DEBUG SESSION" is only printed if (initial) log_level > 0
.