Expand description
Module containing the Config
struct and its associated enums.
Structs§
- ‘Config’ struct that contains the configuration options for the logger. Use
Default::default()
for the default settings.
Enums§
- The output stream for the console. Only applies if
LoggingMode
isConsole
orFileAndConsole
. Defaults toStdout
. - The format of the date and time in the log entries. Defaults to
ISO8601
. - Where the logs are written to. Defaults to
Console
- Whether to write log entries synchronously (io-blocking) or asynchronously. When using asynchronous logging, make sure to call log::logger().flush() before exiting the program. Defaults to
Synchronous
. - The name of the directory where the log file is written to. Only applies if
LoggingMode
isFile
orFileAndConsole
. Defaults toCustom
with the output directory being logs. - The name of the log file. Only applies if
LoggingMode
isFile
orFileAndConsole
. Defaults toAutoGenerate
. - Whether to split the log files by size or not. This has no effect if
OutputFileName
isCustom
, since the new file will have the same name as the old one. IfTrue
, the log files will be split when they reach the specified size (in bytes). Defaults toFalse
. - The time zone used for the log entries. Make sure to use
UTC
for async programs. Defaults toUTC
. - Whether to use ANSI escape codes to color the log entries in the terminal. Defaults to
True
.