diff options
author | Galen Guyer <galen@galenguyer.com> | 2022-11-28 18:27:28 -0500 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2022-11-28 18:27:28 -0500 |
commit | 7e0d43cb4ed3715dbc756a3cbf071430c7d76383 (patch) | |
tree | 547bca214036e5671d70332714be3dd72a451b63 | |
parent | 3a19e67a5841439ccd567e3890a3e1299a4b8887 (diff) |
Cleaner logging creationmistress
-rw-r--r-- | src/main.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index 3ca2b2b..e56ae57 100644 --- a/src/main.rs +++ b/src/main.rs @@ -85,12 +85,15 @@ enum TalkGroupStatus { } fn main() { - #[cfg(debug_assertions)] - let _ = - simplelog::SimpleLogger::init(simplelog::LevelFilter::Debug, simplelog::Config::default()); - #[cfg(not(debug_assertions))] - let _ = - simplelog::SimpleLogger::init(simplelog::LevelFilter::Info, simplelog::Config::default()); + let _ = simplelog::TermLogger::init( + #[cfg(debug_assertions)] + simplelog::LevelFilter::Debug, + #[cfg(not(debug_assertions))] + simplelog::LevelFilter::Info, + simplelog::Config::default(), + simplelog::TerminalMode::Stdout, + simplelog::ColorChoice::Auto, + ); // Load talkgroups from file let mut csv_reader = csv::Reader::from_path("talkgroups.csv").unwrap(); |