diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-02-01 09:13:12 -0500 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-02-01 09:13:12 -0500 |
commit | aa12104e4c5572a5806bf1e6b8dd27d72705ab84 (patch) | |
tree | 6f2f9344d1f139800350784c28d8a5eb6b62b4d8 /src/main.rs | |
parent | fb9f143f2353dc8c64a18be84c12b53cdad847e7 (diff) |
Improve logging legibility
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index 7ced591..235c71f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,15 +20,25 @@ fn setup_logger() -> Result<(), fern::InitError> { let thread_id = &format!("{:?}", thread.id())[..]; let prefix = "ThreadId("; let thread_id = if thread_id.find(prefix).is_some() { - &thread_id[prefix.len() .. thread_id.len() - 1] + &thread_id[prefix.len()..thread_id.len() - 1] } else { thread_id }; - let thread_colors = [Color::Red, Color::Green, Color::Magenta, - Color::Cyan, Color::White, Color::BrightRed, - Color::BrightGreen, Color::BrightMagenta, - Color::BrightWhite]; + let thread_colors = [ + Color::Red, + Color::Green, + Color::Magenta, + Color::Cyan, + Color::White, + Color::Yellow, + Color::BrightRed, + Color::BrightGreen, + Color::BrightMagenta, + Color::BrightCyan, + Color::BrightBlue, + Color::BrightWhite, + ]; use std::collections::hash_map::DefaultHasher; use std::hash::{Hash, Hasher}; let mut hasher = DefaultHasher::new(); |