diff options
Diffstat (limited to 'cli/util/logger.rs')
-rw-r--r-- | cli/util/logger.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/util/logger.rs b/cli/util/logger.rs index 4c185f6de..d64e9a707 100644 --- a/cli/util/logger.rs +++ b/cli/util/logger.rs @@ -2,6 +2,8 @@ use std::io::Write; +use super::draw_thread::DrawThread; + struct CliLogger(env_logger::Logger); impl CliLogger { @@ -21,7 +23,13 @@ impl log::Log for CliLogger { fn log(&self, record: &log::Record) { if self.enabled(record.metadata()) { + // it was considered to hold the draw thread's internal lock + // across logging, but if outputting to stderr blocks then that + // could potentially block other threads that access the draw + // thread's state + DrawThread::hide(); self.0.log(record); + DrawThread::show(); } } |