Skip to content

Commit

Permalink
replace env_logger w/ syslog & log_panic
Browse files Browse the repository at this point in the history
this is due to output as documented in following github issue:
rusterlium/rustler#335

currently uses USER syslog facility
  • Loading branch information
cannadayr committed Sep 24, 2021
1 parent 7770fe9 commit cf927ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ rustler = "0.22.0"
once_cell = "1.8.0"
cc_mt = { git = "https://github.com/jrmuizel/cc-mt" }
log = "0.4.14"
env_logger = "0.9.0"
syslog = "^4.0"
log-panics = "2.0.0"
7 changes: 6 additions & 1 deletion rs_src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
mod schema;
mod ebqn;
use rustler::{Env,Term};
use syslog::{Facility, Error};
extern crate log_panics;

pub fn load(env: Env, _info: Term) -> bool {
rustler::resource!(schema::Env, env);
env_logger::init();
syslog::init(Facility::LOG_USER,
log::LevelFilter::Debug,
Some("ebqn"));
log_panics::init();
true
}
rustler::init!("ebqn", [ebqn::init_st,ebqn::tests],load=load);

0 comments on commit cf927ec

Please sign in to comment.