log panics

This commit is contained in:
ntr 2019-12-19 13:50:26 +10:00
parent 24b1de7724
commit 16488ee0ee
2 changed files with 4 additions and 0 deletions

View File

@ -25,6 +25,7 @@ dotenv = "0.9.0"
log = "0.4"
fern = { version = "0.5", features = ["colored", "syslog-4"] }
syslog = "4"
log-panics = "2"
iron = "0.6"
bodyparser = "0.8"

View File

@ -15,6 +15,7 @@ extern crate serde_cbor;
#[macro_use] extern crate failure;
extern crate fern;
extern crate log_panics;
#[macro_use] extern crate log;
extern crate stripe;
@ -55,6 +56,8 @@ use crossbeam_channel::{unbounded};
#[cfg(unix)]
pub fn setup_logger() -> Result<(), fern::InitError> {
log_panics::init();
let formatter = syslog::Formatter3164 {
facility: syslog::Facility::LOG_USER,
hostname: None,