Replace logging backend to log4rs and add log rotation (#1789)
* Replace logging backend to flexi-logger and add log rotation * Changed flexi_logger to log4rs * Disable logging level filtering in Root logger * Support different logging levels for file and stdout * Don't log messages from modules other than Grin-related * Fix formatting * Place backed up compressed log copies into log file directory * Increase default log file size to 16 MiB * Add comment to config file on log_max_size option
This commit is contained in:
@@ -25,7 +25,6 @@ use core::pow::Difficulty;
|
||||
use msg::{read_message, write_message, Hand, Shake, SockAddr, Type, PROTOCOL_VERSION, USER_AGENT};
|
||||
use peer::Peer;
|
||||
use types::{Capabilities, Direction, Error, P2PConfig, PeerInfo, PeerLiveInfo};
|
||||
use util::LOGGER;
|
||||
|
||||
const NONCES_CAP: usize = 100;
|
||||
|
||||
@@ -115,7 +114,6 @@ impl Handshake {
|
||||
}
|
||||
|
||||
debug!(
|
||||
LOGGER,
|
||||
"Connected! Cumulative {} offered from {:?} {:?} {:?}",
|
||||
shake.total_difficulty.to_num(),
|
||||
peer_info.addr,
|
||||
@@ -186,7 +184,7 @@ impl Handshake {
|
||||
};
|
||||
|
||||
write_message(conn, shake, Type::Shake)?;
|
||||
trace!(LOGGER, "Success handshake with {}.", peer_info.addr);
|
||||
trace!("Success handshake with {}.", peer_info.addr);
|
||||
|
||||
// when more than one protocol version is supported, choosing should go here
|
||||
Ok(peer_info)
|
||||
|
||||
Reference in New Issue
Block a user