Expand description
§filtering
Use the ENV variable RUST_LOG
with module_name=level
RUST_LOG="tokio=warn,my_module=info,my_module::inner=trace"
A default level can be provided with just level. e.g. RUST_LOG=trace
will enable trace
for all modules.
You can disable specific modules/crates by using the off
level
§optional features
Modules§
- options
- Configuration for various loggers
Structs§
- Color
Config - Color configuration for the logger
- File
Logger std::io::Write
based logger, intended forstd::fs::File
- Multi
Logger - A multi-logger
- Options
- Configuration for the logger
- Term
Logger - Stdout logger which supports colors
Enums§
- Color
- The set of available colors for the terminal foreground/background.
- Error
- An error returned by the logger initialization
- Style
Config - Logger line breaking style
- Time
Config - How the timestamp should be displayed
Functions§
- init
- Initialize the logger
- init_
alt_ term_ logger - Convenience function to create a terminal logger that uses a single-line output, and unix timestamps.
- init_
term_ logger - Convenience function to create a default terminal logger