[][src]Crate alto_logger

alto_logger

filtering

Use the ENV variable RUST_LOG with module_name=level

RUST_LOG="tokio=warn,my_module=info,my_module::inner=trace"

output

single line

alto_logger::init(Style::SingleLine, ColorConfig::default()).unwrap();
TRACE 0000.003160400s [mio::poll] registering with poller
TRACE 0000.003683900s [mio::sys::windows::selector] register Token(0) Readable | Writable
TRACE 0000.004215900s [mio::sys::windows::selector] set readiness to (empty)
TRACE 0000.004580800s [mio::sys::windows::tcp] scheduling an accept
INFO  0000.004912900s [asta] listening on: 127.0.0.1:6667
TRACE 0000.005196400s [mio::sys::windows::selector] select; timeout=None
TRACE 0000.005473200s [mio::sys::windows::selector] polling IOCP

multiple lines

alto_logger::init(Style::MultiLine, ColorConfig::default()).unwrap();
TRACE 0000.004610900s [mio::poll]
⤷ registering with poller
TRACE 0000.005204200s [mio::sys::windows::selector]
⤷ register Token(0) Readable | Writable
TRACE 0000.005798000s [mio::sys::windows::selector]
⤷ set readiness to (empty)
TRACE 0000.006217100s [mio::sys::windows::tcp]
⤷ scheduling an accept
INFO  0000.006675800s [asta]
⤷ listening on: 127.0.0.1:6667
TRACE 0000.007179100s [mio::sys::windows::selector]
⤷ select; timeout=None
TRACE 0000.007552300s [mio::sys::windows::selector]
⤷ polling IOCP

Structs

ColorConfig

Color configuration for the logger

Enums

Style

Logger style

Functions

init

Initialize the logger