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
+2 -6
View File
@@ -25,7 +25,6 @@ use core::core::hash::Hashed;
use core::core::pmmr;
use core::core::BlockHeader;
use prune_list::PruneList;
use util::LOGGER;
/// Compact (roaring) bitmap representing the set of positions of
/// leaves that are currently unpruned in the MMR.
@@ -64,7 +63,7 @@ impl LeafSet {
let cp_file_path = Path::new(&cp_path);
if !cp_file_path.exists() {
debug!(LOGGER, "leaf_set: rewound leaf file not found: {}", cp_path);
debug!("leaf_set: rewound leaf file not found: {}", cp_path);
return Ok(());
}
@@ -73,10 +72,7 @@ impl LeafSet {
bitmap_file.read_to_end(&mut buffer)?;
let bitmap = Bitmap::deserialize(&buffer);
debug!(
LOGGER,
"leaf_set: copying rewound file {} to {}", cp_path, path
);
debug!("leaf_set: copying rewound file {} to {}", cp_path, path);
let mut leaf_set = LeafSet {
path: path.clone(),