mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-01 19:04:47 +02:00
other: keep running even if logger fails to initialize (#1132)
This just makes it so that even if the logger is enabled, if it fails to initialize (e.g. read-only directory), bottom will still continue to start up, and just print a warning that the logger encountered an issue.
This commit is contained in:
parent
4cdedffaee
commit
b60a62d5f0
@ -47,7 +47,11 @@ fn main() -> Result<()> {
|
|||||||
let matches = clap::get_matches();
|
let matches = clap::get_matches();
|
||||||
#[cfg(all(feature = "fern"))]
|
#[cfg(all(feature = "fern"))]
|
||||||
{
|
{
|
||||||
utils::logging::init_logger(log::LevelFilter::Debug, std::ffi::OsStr::new("debug.log"))?;
|
if let Err(err) =
|
||||||
|
utils::logging::init_logger(log::LevelFilter::Debug, std::ffi::OsStr::new("debug.log"))
|
||||||
|
{
|
||||||
|
println!("Issue initializing logger: {err}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read from config file.
|
// Read from config file.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user