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 <CE.Mohammad.AlSaleh@gmail.com>
This commit is contained in:
Mohammad AlSaleh 2024-01-11 02:14:37 +03:00 committed by Jeremy Soller
parent 9b185c9610
commit 9188f3c0bf

View file

@ -878,7 +878,7 @@ impl Application for App {
}
}
_ => {
println!("TODO: {:?}", event);
log::warn!("TODO: {:?}", event);
}
},
Message::TermEventTx(term_event_tx) => {