From c968e44349436289e636acb2ada16dc90566806f Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 23 Jan 2024 14:02:46 +0100 Subject: [PATCH] add uptime to init --- members/libpt-log/src/lib.rs | 4 ++-- src/ccc/mod.rs | 2 +- src/hedu/mod.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/members/libpt-log/src/lib.rs b/members/libpt-log/src/lib.rs index 7073f48..242cc6c 100644 --- a/members/libpt-log/src/lib.rs +++ b/members/libpt-log/src/lib.rs @@ -75,7 +75,7 @@ impl Logger { /// Will enable the logger to be used. /// /// Assumes some defaults, use [`init_customized`](Self::init_customized) for more control - pub fn init(log_dir: Option, max_level: Option) -> Result<()> { + pub fn init(log_dir: Option, max_level: Option, uptime: bool) -> Result<()> { Self::init_customized( log_dir.is_some(), log_dir.unwrap_or(PathBuf::from(DEFAULT_LOG_DIR)), @@ -89,7 +89,7 @@ impl Logger { false, false, true, - false, + uptime, ) } diff --git a/src/ccc/mod.rs b/src/ccc/mod.rs index c15bf87..b12d116 100644 --- a/src/ccc/mod.rs +++ b/src/ccc/mod.rs @@ -91,7 +91,7 @@ fn main() { } }; if cli.log_meta { - Logger::init(None, Some(ll)).expect("could not initialize Logger"); + Logger::init(None, Some(ll), false).expect("could not initialize Logger"); } else { // less verbose version Logger::init_mini(Some(ll)).expect("could not initialize Logger"); diff --git a/src/hedu/mod.rs b/src/hedu/mod.rs index 83d5309..d8473c6 100644 --- a/src/hedu/mod.rs +++ b/src/hedu/mod.rs @@ -165,7 +165,7 @@ fn cli_parse() -> Cli { } }; if cli.meta { - Logger::init(None, Some(ll)).expect("could not initialize Logger"); + Logger::init(None, Some(ll), false).expect("could not initialize Logger"); } else { // less verbose version Logger::init_mini(Some(ll)).expect("could not initialize Logger");