about summary refs log tree commit diff stats
path: root/src/main.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-06-13 06:37:35 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-06-13 06:37:59 +0200
commit3e80cef8b2575f871aeea01917edcfb25356c290 (patch)
treeb6fdc36f99835e3ad184b258f69ce2fe87f9369f /src/main.rs
parentbuild(update.sh): First upgrade then update (diff)
downloadlpm-3e80cef8b2575f871aeea01917edcfb25356c290.zip
feat(cli): Switch to stderrlog, configured by cli options
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 9 insertions, 1 deletions
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")?;