Skip to content

Commit

Permalink
Fixing colored output on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zakstucke committed Jun 14, 2024
1 parent b89a722 commit d153339
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .zetch.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions rust/bitbazaar/log/global_log/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ impl<'writer> tracing_subscriber::fmt::MakeWriter<'writer> for super::builder::C
}

pub fn builder_into_global_log(builder: GlobalLogBuilder) -> RResult<GlobalLog, AnyErr> {
#[cfg(windows)]
// When on windows, this might be needed to fix colored output:
let _ = colored::control::set_virtual_terminal(true);

// Configure the program to automatically log panics as an error event on the current span:
super::exceptions::auto_trace_panics();

Expand Down

0 comments on commit d153339

Please sign in to comment.