Initialize the logger at the start of main.
"Any log events that occur before initialization will be ignored." https://docs.rs/env_logger/latest/env_logger/struct.Builder.html#method.init
This commit is contained in:
parent
e7b0b87259
commit
623645c829
1 changed files with 2 additions and 2 deletions
|
|
@ -80,6 +80,8 @@ pub fn icon_cache_get(name: &'static str, size: u16) -> widget::icon::Icon {
|
|||
|
||||
/// Runs application with these settings
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("warn")).init();
|
||||
|
||||
let mut daemonize = true;
|
||||
let mut args_iter = env::args().fuse();
|
||||
// more performant than an iterator adapter
|
||||
|
|
@ -114,8 +116,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("warn")).init();
|
||||
|
||||
localize::localize();
|
||||
|
||||
let (config_handler, config) = match cosmic_config::Config::new(App::APP_ID, CONFIG_VERSION) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue