summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorNathan Perry <avaglir@gmail.com>2018-02-14 16:18:37 -0500
committerNathan Perry <avaglir@gmail.com>2018-02-14 16:18:37 -0500
commitbe966678275ea47d72cf5be1340eaba0e281285a (patch)
tree392526ad10c8151949afda6d3521f34c6010a0d8 /src/main.rs
parentd44b8e167e657cf088c2c28f15159e7de31d5886 (diff)
improve logging
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 3f29d8e..b624d96 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -127,10 +127,17 @@ fn main() {
message
))
})
- .level(log::LevelFilter::Warn)
- .level_for("thulani_rs", log::LevelFilter::Trace)
.level_for("serenity::voice::connection", log::LevelFilter::Error)
- .chain(std::io::stdout())
+ .chain(fern::Dispatch::new()
+ .level(log::LevelFilter::Warn)
+ .level_for("thulani", log::LevelFilter::Debug)
+ .chain(std::io::stdout())
+ )
+ .chain(fern::Dispatch::new()
+ .level(log::LevelFilter::Info)
+ .level_for("thulani", log::LevelFilter::Trace)
+ .chain(fern::log_file("thulani.log").expect("problem creating log file"))
+ )
.apply()
.expect("error initializing logging");