Changed log levels to make alfis less chatty.
This commit is contained in:
@@ -128,7 +128,7 @@ impl Chain {
|
||||
}
|
||||
|
||||
pub fn add_block(&mut self, block: Block) {
|
||||
info!("Adding block:\n{:?}", &block);
|
||||
debug!("Adding block:\n{:?}", &block);
|
||||
self.blocks.push(block.clone());
|
||||
self.last_block = Some(block.clone());
|
||||
if block.transaction.is_some() {
|
||||
@@ -278,7 +278,7 @@ impl Chain {
|
||||
Ok(mut statement) => {
|
||||
while statement.next().unwrap() == State::Row {
|
||||
let data = statement.read::<String>(0).unwrap();
|
||||
info!("Got zone data {}", &data);
|
||||
debug!("Got zone data {}", &data);
|
||||
if let Ok(zone_data) = serde_json::from_str::<ZoneData>(&data) {
|
||||
map.insert(zone_data.name.clone(), zone_data);
|
||||
}
|
||||
|
||||
+3
-3
@@ -43,16 +43,16 @@ fn create_server_context(context: Arc<Mutex<Context>>, settings: &Settings) -> A
|
||||
if cfg!(target_os = "windows") {
|
||||
if let Ok(root) = env::var("SYSTEMROOT") {
|
||||
let filename = format!("{}{}", &root, "\\System32\\drivers\\etc\\hosts");
|
||||
info!("Loading hosts from '{}'", &filename);
|
||||
debug!("Loading hosts from '{}'", &filename);
|
||||
server_context.filters.push(Box::new(HostsFilter::new(&filename)));
|
||||
}
|
||||
} else {
|
||||
let filename = "/etc/hosts";
|
||||
info!("Loading hosts from '{}'", filename);
|
||||
debug!("Loading hosts from '{}'", filename);
|
||||
server_context.filters.push(Box::new(HostsFilter::new(filename)));
|
||||
}
|
||||
} else {
|
||||
info!("Loading hosts from '{}'", &host);
|
||||
debug!("Loading hosts from '{}'", &host);
|
||||
server_context.filters.push(Box::new(HostsFilter::new(host)));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ impl Miner {
|
||||
match context.lock().unwrap().chain.last_block() {
|
||||
None => {}
|
||||
Some(last_block) => {
|
||||
info!("Last block found");
|
||||
debug!("Last block found");
|
||||
// If we were doing something else and got new block before we could mine this block
|
||||
if last_block.index > job.block.index || last_block.hash != job.block.prev_block_hash {
|
||||
warn!("We missed block to lock");
|
||||
|
||||
+3
-3
@@ -91,7 +91,7 @@ impl Network {
|
||||
}
|
||||
|
||||
if yggdrasil_only && !is_yggdrasil(&address.ip()) {
|
||||
info!("Dropping connection from Internet");
|
||||
debug!("Dropping connection from Internet");
|
||||
stream.shutdown(Shutdown::Both).unwrap_or_else(|e|{ warn!("Error in shutdown, {}", e); });
|
||||
let _ = poll.registry().reregister(&mut server, SERVER, Interest::READABLE);
|
||||
continue;
|
||||
@@ -104,7 +104,7 @@ impl Network {
|
||||
stream.shutdown(Shutdown::Both).unwrap_or_else(|e|{ warn!("Error in shutdown, {}", e); });
|
||||
warn!("Detected connection loop, ignoring IP: {}", &address.ip());
|
||||
} else {
|
||||
info!("Accepted connection from: {} to local IP: {}", address, local_ip);
|
||||
debug!("Accepted connection from: {} to local IP: {}", address, local_ip);
|
||||
let token = next(&mut unique_token);
|
||||
poll.registry().register(&mut stream, token, Interest::READABLE).expect("Error registering poll");
|
||||
peers.add_peer(token, Peer::new(address, stream, State::Connected, true));
|
||||
@@ -434,7 +434,7 @@ fn handle_message(context: Arc<Mutex<Context>>, message: Message, peers: &mut Pe
|
||||
}
|
||||
}
|
||||
Message::Block { index, block } => {
|
||||
info!("Received block {}", index);
|
||||
debug!("Received block {}", index);
|
||||
let block: Block = match serde_json::from_str(&block) {
|
||||
Ok(block) => block,
|
||||
Err(_) => return State::Error
|
||||
|
||||
+1
-1
@@ -251,7 +251,7 @@ fn action_loaded(context: &Arc<Mutex<Context>>, web_view: &mut WebView<()>) {
|
||||
}
|
||||
}
|
||||
Event::BlockchainChanged {index} => {
|
||||
info!("Current blockchain height is {}", index);
|
||||
debug!("Current blockchain height is {}", index);
|
||||
if let Ok(zones) = serde_json::to_string(&context.chain.get_zones()) {
|
||||
let _ = handle.dispatch(move |web_view|{
|
||||
web_view.eval(&format!("zonesChanged('{}');", &zones))
|
||||
|
||||
Reference in New Issue
Block a user