Skip to content

Commit

Permalink
feat: more flexible log level
Browse files Browse the repository at this point in the history
  • Loading branch information
desbma-s1n committed May 29, 2024
1 parent 5876b7b commit 66d4a3e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ fn sd_options(
fn main() -> anyhow::Result<()> {
// Init logger
simple_logger::SimpleLogger::new()
.with_level(if cfg!(debug_assertions) {
log::LevelFilter::Debug
} else {
log::LevelFilter::Info
})
.env()
.init()
.context("Failed to init logger")?;
.context("Failed to setup logger")?;

// Get versions
let sd_version = systemd::SystemdVersion::local_system()?;
Expand Down

0 comments on commit 66d4a3e

Please sign in to comment.