1use clap::Parser;
2use traccia::{LogLevel, debug, fatal, info};
3
4#[derive(Parser)]
5#[command(version, about, long_about = None)]
6struct Args {
7 #[arg(short, long, default_value_t = LogLevel::Info)]
9 level: LogLevel,
10}
11
12fn main() {
13 let args = Args::parse();
14
15 traccia::init(args.level);
16
17 debug!("This will not be logged if no argument is specified.");
18 info!("This will be logged if no argument is specified.");
19
20 fatal!("Maybe pass -l fatal for only fatal messages to be logged?");
21}