Expand description
Simple structured logging.
This crate is a stop-gap till log::kv
stabilizes. It marries tracing
’s awesome
event!
macro to log
’s simplicity. The plan is to eventually drop the custom
macros in this crate and integrate with log
directly.
To start using this crate, initialize a logger as early as possible in your program,
then use the trace!
, debug!
, info!
, warn!
, error!
or fatal!
macros to log messages and key-value pairs!
use lumbermill::{info , Logger};
Logger::default().init(); // Use the default configuration
info!(addr.ip = "0.0.0.0", uptime = 9001, "Server is listening on port {}", 3000);
Macro documentation delves deeper into what you can supply to them. Refer to it for details.
Macros§
- debug
- Log at the
Debug
level - error
- Log at the
Error
level - fatal
- Log at the
Fatal
level - info
- Log at the
Info
level - log
- Log at the supplied level.
- trace
- Log at the
Trace
level. - warn
- Log at the
Warn
level