Initial implementation of dynamic gas pricer.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
use std::env;
|
||||
use std::borrow::Cow;
|
||||
use rlog::{LogLevelFilter};
|
||||
use rlog::{LogLevelFilter, LogRecord};
|
||||
use env_logger::LogBuilder;
|
||||
use std::sync::{RwLock, RwLockReadGuard};
|
||||
use std::sync::atomic::{Ordering, AtomicBool};
|
||||
@@ -45,6 +45,12 @@ impl<T: AsRef<str>> Applyable for T {
|
||||
}
|
||||
}
|
||||
|
||||
fn markup(r: &LogRecord) -> String {
|
||||
let s = format!("{}", r.args());
|
||||
println!("{}", s);
|
||||
s
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
static ref LOG_DUMMY: bool = {
|
||||
let mut builder = LogBuilder::new();
|
||||
@@ -54,7 +60,10 @@ lazy_static! {
|
||||
builder.parse(&log);
|
||||
}
|
||||
|
||||
if let Ok(_) = builder.init() {
|
||||
println!("HERE!");
|
||||
builder.format(markup);
|
||||
|
||||
if builder.init().is_ok() {
|
||||
println!("logger initialized");
|
||||
}
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user