Skip to content

Commit

Permalink
Filter syslog to DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
leo60228 committed Oct 19, 2020
1 parent 813b758 commit ff236d2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions idol_bot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,14 @@ fn logger() -> Result<()> {
process: "idol_bot".to_owned(),
pid: std::process::id() as _,
};
let (syslog, syslog_err): (fern::Output, _) = match syslog::unix(syslog_fmt) {
Ok(syslog) => (syslog.into(), None),
Err(err) => (fern::Dispatch::new().into(), Some(err)),
let (syslog, syslog_err): (fern::Dispatch, _) = match syslog::unix(syslog_fmt) {
Ok(syslog) => (
fern::Dispatch::new()
.level(log::LevelFilter::Debug)
.chain(syslog),
None,
),
Err(err) => (fern::Dispatch::new(), Some(err)),
};
fern::Dispatch::new()
.level(log::LevelFilter::Warn)
Expand Down

0 comments on commit ff236d2

Please sign in to comment.