From 9188f3c0bfa13abbc0f3a59cf9965e1c15e36fb9 Mon Sep 17 00:00:00 2001 From: Mohammad AlSaleh Date: Thu, 11 Jan 2024 02:14:37 +0300 Subject: [PATCH] Use `log::warn!()` instead of `println!()` This causes a functional change that may not be obvious. When running `cosmic-term` from a shell prompt as a detached process, `stdout`/`stderr` descriptors get deleted, and a `println!()` message would take the `cosmic-term` process down. No such an issue with log messages. This can be tested by running `htop` then exiting the tool, which would trigger a "TODO: CursorBlinkingChange" message. Signed-off-by: Mohammad AlSaleh --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index d4f7708..4aed03f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -878,7 +878,7 @@ impl Application for App { } } _ => { - println!("TODO: {:?}", event); + log::warn!("TODO: {:?}", event); } }, Message::TermEventTx(term_event_tx) => {