From 6785d154460921cc3b774376a676a226402d8270 Mon Sep 17 00:00:00 2001 From: tcmal Date: Wed, 26 Jun 2024 21:03:36 +0100 Subject: add logging macros for debug mode only printing --- src/main.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 83cabd4..3de3df9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,6 +41,7 @@ mod error; #[doc(hidden)] mod focus; pub mod keys; +pub mod log; fn main() -> Result<()> { cleanup_process_children(); @@ -79,10 +80,7 @@ impl<'a> WM<'a> { loop { match self.conn.wait_for_event() { Ok(x) => { - #[cfg(debug_assertions)] - { - eprintln!("received event: {x:?}"); - }; + debug!("received event: {x:?}"); match x { // See keys.rs -- cgit v1.2.3