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:
eupn
2018-10-21 23:30:56 +03:00
committed by Ignotus Peverell
parent 0852b0c4cf
commit 1195071f5b
83 changed files with 582 additions and 897 deletions
-3
View File
@@ -31,7 +31,6 @@ use util::RwLock;
use core::ser;
use msg::{read_body, read_exact, read_header, write_all, write_to_buf, MsgHeader, Type};
use types::Error;
use util::LOGGER;
/// A trait to be implemented in order to receive messages from the
/// connection. Allows providing an optional response.
@@ -234,7 +233,6 @@ fn poll<H>(
if let Some(h) = try_break!(error_tx, read_header(conn, None)) {
let msg = Message::from_header(h, conn);
trace!(
LOGGER,
"Received message header, type {:?}, len {}.",
msg.header.msg_type,
msg.header.msg_len
@@ -276,7 +274,6 @@ fn poll<H>(
// check the close channel
if let Ok(_) = close_rx.try_recv() {
debug!(
LOGGER,
"Connection close with {} initiated by us",
conn.peer_addr()
.map(|a| a.to_string())