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
-1
@@ -10,7 +10,7 @@ blake2-rfc = "0.2"
|
||||
rand = "0.5"
|
||||
serde = "1"
|
||||
serde_derive = "1"
|
||||
slog = { version = "~2.3", features = ["max_level_trace", "release_max_level_trace"] }
|
||||
log = "0.4"
|
||||
chrono = "0.4.4"
|
||||
|
||||
grin_core = { path = "../core" }
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ extern crate serde;
|
||||
#[macro_use] // Needed for Serialize/Deserialize. The compiler complaining here is a bug.
|
||||
extern crate serde_derive;
|
||||
#[macro_use]
|
||||
extern crate slog;
|
||||
extern crate log;
|
||||
extern crate chrono;
|
||||
|
||||
mod pool;
|
||||
|
||||
@@ -26,7 +26,6 @@ use core::core::transaction;
|
||||
use core::core::verifier_cache::VerifierCache;
|
||||
use core::core::{Block, BlockHeader, BlockSums, Committed, Transaction, TxKernel};
|
||||
use types::{BlockChain, PoolEntry, PoolEntryState, PoolError};
|
||||
use util::LOGGER;
|
||||
|
||||
// max weight leaving minimum space for a coinbase
|
||||
const MAX_MINEABLE_WEIGHT: usize =
|
||||
@@ -192,7 +191,6 @@ impl Pool {
|
||||
header: &BlockHeader,
|
||||
) -> Result<(), PoolError> {
|
||||
debug!(
|
||||
LOGGER,
|
||||
"pool [{}]: add_to_pool: {}, {:?}, inputs: {}, outputs: {}, kernels: {} (at block {})",
|
||||
self.name,
|
||||
entry.tx.hash(),
|
||||
|
||||
Reference in New Issue
Block a user