Merge pull request #261 from ethcore/fixed_crashing_tests

fixed blockchain tests crash on log init
This commit is contained in:
Arkadiy Paronyan 2016-01-29 14:21:25 +01:00
commit 53f9bff95c
1 changed files with 5 additions and 3 deletions

View File

@ -18,11 +18,13 @@ lazy_static! {
let mut builder = LogBuilder::new();
builder.filter(None, LogLevelFilter::Info);
if env::var("RUST_LOG").is_ok() {
builder.parse(&env::var("RUST_LOG").unwrap());
if let Ok(log) = env::var("RUST_LOG") {
builder.parse(&log);
}
builder.init().unwrap();
if let Ok(_) = builder.init() {
println!("logger initialized");
}
true
};
}