From 3e80cef8b2575f871aeea01917edcfb25356c290 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 13 Jun 2024 06:37:35 +0200 Subject: feat(cli): Switch to stderrlog, configured by cli options --- src/main.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 8c2ea62..8d1c977 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,8 +22,16 @@ pub mod new; pub mod file_tree; fn main() -> anyhow::Result<()> { - env_logger::init(); let args = Args::parse(); + stderrlog::new() + .module(module_path!()) + .quiet(args.quiet) + .show_module_names(false) + .color(stderrlog::ColorChoice::Auto) + .verbosity(args.verbosity as usize) + .timestamp(stderrlog::Timestamp::Off) + .init() + .expect("Let's just hope that this does not panic"); let project_root = get_project_root_by_lmp_toml().context("Looking for the project root")?; -- cgit 1.4.1