mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-25 21:50:20 +00: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
1 changed files with 5 additions and 1 deletions
|
@ -47,7 +47,11 @@ fn main() -> Result<()> {
|
|||
let matches = clap::get_matches();
|
||||
#[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.
|
||||
|
|
Loading…
Reference in a new issue