generated from PlexSheep/baserepo
Merge branch 'devel' of https://git.cscherr.de/PlexSheep/pt into devel
cargo devel CI / cargo CI (push) Has been cancelled
Details
cargo devel CI / cargo CI (push) Has been cancelled
Details
This commit is contained in:
commit
5f521fc00e
|
@ -75,7 +75,7 @@ impl Logger {
|
||||||
/// Will enable the logger to be used.
|
/// Will enable the logger to be used.
|
||||||
///
|
///
|
||||||
/// Assumes some defaults, use [`init_customized`](Self::init_customized) for more control
|
/// 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(
|
Self::init_customized(
|
||||||
log_dir.is_some(),
|
log_dir.is_some(),
|
||||||
log_dir.unwrap_or(PathBuf::from(DEFAULT_LOG_DIR)),
|
log_dir.unwrap_or(PathBuf::from(DEFAULT_LOG_DIR)),
|
||||||
|
@ -89,7 +89,7 @@ impl Logger {
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
false,
|
uptime,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if cli.log_meta {
|
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 {
|
} else {
|
||||||
// less verbose version
|
// less verbose version
|
||||||
Logger::init_mini(Some(ll)).expect("could not initialize Logger");
|
Logger::init_mini(Some(ll)).expect("could not initialize Logger");
|
||||||
|
|
|
@ -165,7 +165,7 @@ fn cli_parse() -> Cli {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if cli.meta {
|
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 {
|
} else {
|
||||||
// less verbose version
|
// less verbose version
|
||||||
Logger::init_mini(Some(ll)).expect("could not initialize Logger");
|
Logger::init_mini(Some(ll)).expect("could not initialize Logger");
|
||||||
|
|
Reference in New Issue