Expand description
Module containing the Config
struct and its associated enums.
Structs§
- Config
- ‘Config’ struct that contains the configuration options for the logger.
Use
Default::default()
for the default settings.
Enums§
- Console
Mode - The output stream for the console. Only applies if
LoggingMode
isConsole
orFileAndConsole
. Defaults toStdout
. - Date
Time Format - The format of the date and time in the log entries.
Defaults to
ISO8601
. - Logging
Mode - Where the logs are written to.
Defaults to
Console
- Logging
Strategy - 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
. - Output
DirName - 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. - Output
File Name - The name of the log file. Only applies if
LoggingMode
isFile
orFileAndConsole
. Defaults toAutoGenerate
. - Split
LogFiles - 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
. - Time
Zone - The time zone used for the log entries.
Make sure to use
UTC
for async programs. Defaults toUTC
. - UseTerm
Color - Whether to use ANSI escape codes to color the log entries in the terminal.
Defaults to
True
.