Crate loglog [−] [src]
loglog
loglog aims to be a simple and ergonomic logger that you can drop straight
into your code. It uses env_logger
behind the scenes, so you can use your
familiar log
crate macros.
Usage
Add loglog
to your Cargo.toml
:
[dependencies]
log = "0.3"
loglog = "0.3"
After initializing the logger, the log
crate macros will be available.
Example
#[macro_use] extern crate log; extern crate loglog; fn main() { loglog::build() .time(Some("%H:%M")) .init() .unwrap(); info!("This is an informational {}", "message"); error!("This is not good!"); }
Structs
LogLogBuilder |
The main logger builder. |
Functions
build |
Create the logger builder with some default values. |
init |
Quickly start the logger with the default settings. |