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:
+1
-2
@@ -26,7 +26,6 @@ use core::ser::{self, Readable, Reader, Writeable, Writer};
|
||||
use grin_store::{self, option_to_not_found, to_key, Error};
|
||||
use msg::SockAddr;
|
||||
use types::{Capabilities, ReasonForBan};
|
||||
use util::LOGGER;
|
||||
|
||||
const STORE_SUBPATH: &'static str = "peers";
|
||||
|
||||
@@ -111,7 +110,7 @@ impl PeerStore {
|
||||
}
|
||||
|
||||
pub fn save_peer(&self, p: &PeerData) -> Result<(), Error> {
|
||||
debug!(LOGGER, "save_peer: {:?} marked {:?}", p.addr, p.flags);
|
||||
debug!("save_peer: {:?} marked {:?}", p.addr, p.flags);
|
||||
|
||||
let batch = self.db.batch()?;
|
||||
batch.put_ser(&peer_key(p.addr)[..], p)?;
|
||||
|
||||
Reference in New Issue
Block a user