Merge branch 'devel' of https://git.cscherr.de/PlexSheep/pt into devel
cargo devel CI / cargo CI (push) Has been cancelled Details

This commit is contained in:
Christoph J. Scherr 2024-01-23 14:03:01 +01:00
commit 5f521fc00e
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
3 changed files with 4 additions and 4 deletions

View File

@ -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<PathBuf>, max_level: Option<Level>) -> Result<()> {
pub fn init(log_dir: Option<PathBuf>, max_level: Option<Level>, 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,
)
}

View File

@ -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");

View File

@ -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");