mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-17 07:41:04 +00:00
Refactor executables to separate crates
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
extern crate log;
|
||||
|
||||
use std::env;
|
||||
use log::LogLevelFilter;
|
||||
use env_logger::LogBuilder;
|
||||
|
||||
lazy_static! {
|
||||
static ref LOG_DUMMY: bool = {
|
||||
let mut builder = LogBuilder::new();
|
||||
builder.filter(None, LogLevelFilter::Info);
|
||||
|
||||
if let Ok(log) = env::var("RUST_LOG") {
|
||||
builder.parse(&log);
|
||||
}
|
||||
|
||||
if let Ok(_) = builder.init() {
|
||||
trace!("logger initialized");
|
||||
}
|
||||
true
|
||||
};
|
||||
}
|
||||
|
||||
/// Intialize log with default settings
|
||||
pub fn init_log() {
|
||||
let _ = *LOG_DUMMY;
|
||||
}
|
||||
Reference in New Issue
Block a user