Module logpeek::config

source ·
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 is Console or FileAndConsole. Defaults to Stdout.
  • 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 is File or FileAndConsole. Defaults to Custom with the output directory being logs.
  • The name of the log file. Only applies if LoggingMode is File or FileAndConsole. Defaults to AutoGenerate.
  • Whether to split the log files by size or not. This has no effect if OutputFileName is Custom, since the new file will have the same name as the old one. If True, the log files will be split when they reach the specified size (in bytes). Defaults to False.
  • The time zone used for the log entries. Make sure to use UTC for async programs. Defaults to UTC.
  • Whether to use ANSI escape codes to color the log entries in the terminal. Defaults to True.