output/
output.rs

1use traccia::{debug, error, fatal, info, Console, LogLevel, Output};
2
3fn main() {
4    traccia::init_with_config(traccia::Config {
5        level: LogLevel::Debug,
6        targets: vec![Box::new(Console::new().output(Output::Stderr))],
7        ..Default::default()
8    });
9
10    debug!("This will be logged to stderr.");
11    info!("In fact, all messages will be logged to stderr.");
12    error!("This is an error logged to stderr!!!");
13    fatal!("This is a fatal error logged to stderr!!!");
14}