diff --git a/Cargo.toml b/Cargo.toml index 0c2b37c1..f1d4f525 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,5 +30,3 @@ cctk = { package = "cosmic-client-toolkit", git = "https://github.com/pop-os//co # xdg-shell-wrapper = { git = "https://github.com/pop-os/xdg-shell-wrapper//", branch = "update" } # xdg-shell-wrapper-config = { git = "https://github.com/pop-os/xdg-shell-wrapper//", branch = "update" } -# [patch."https://github.com/pop-os/libcosmic"] -# cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "zbus-4" } diff --git a/cosmic-panel-bin/src/main.rs b/cosmic-panel-bin/src/main.rs index 76d3a3b2..2dc8c427 100644 --- a/cosmic-panel-bin/src/main.rs +++ b/cosmic-panel-bin/src/main.rs @@ -71,8 +71,13 @@ fn main() -> Result<()> { #[cfg(target_env = "gnu")] malloc::limit_mmap_threshold(); let fmt_layer = fmt::layer().with_target(false); - let filter_layer = - EnvFilter::try_from_default_env().or_else(|_| EnvFilter::try_new("warn")).unwrap(); + let filter_layer = EnvFilter::try_from_default_env().unwrap_or_else(|_| { + if cfg!(debug_assertions) { + EnvFilter::new(format!("warn,{}=debug", env!("CARGO_CRATE_NAME"))) + } else { + EnvFilter::new("warn") + } + }); if let Ok(journal_layer) = tracing_journald::layer() { tracing_subscriber::registry().with(journal_layer).with(filter_layer).init(); } else {