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:
+2
-4
@@ -26,7 +26,6 @@ use error::{Error, ErrorKind};
|
||||
use failure::ResultExt;
|
||||
use keychain::Keychain;
|
||||
use util;
|
||||
use util::LOGGER;
|
||||
|
||||
pub const SEED_FILE: &'static str = "wallet.seed";
|
||||
|
||||
@@ -118,7 +117,7 @@ impl WalletSeed {
|
||||
wallet_config.data_file_dir, MAIN_SEPARATOR, SEED_FILE,
|
||||
);
|
||||
|
||||
debug!(LOGGER, "Generating wallet seed file at: {}", seed_file_path);
|
||||
debug!("Generating wallet seed file at: {}", seed_file_path);
|
||||
|
||||
if Path::new(seed_file_path).exists() {
|
||||
Err(ErrorKind::WalletSeedExists)?
|
||||
@@ -140,7 +139,7 @@ impl WalletSeed {
|
||||
wallet_config.data_file_dir, MAIN_SEPARATOR, SEED_FILE,
|
||||
);
|
||||
|
||||
debug!(LOGGER, "Using wallet seed file at: {}", seed_file_path,);
|
||||
debug!("Using wallet seed file at: {}", seed_file_path,);
|
||||
|
||||
if Path::new(seed_file_path).exists() {
|
||||
let mut file = File::open(seed_file_path).context(ErrorKind::IO)?;
|
||||
@@ -150,7 +149,6 @@ impl WalletSeed {
|
||||
Ok(wallet_seed)
|
||||
} else {
|
||||
error!(
|
||||
LOGGER,
|
||||
"wallet seed file {} could not be opened (grin wallet init). \
|
||||
Run \"grin wallet init\" to initialize a new wallet.",
|
||||
seed_file_path
|
||||
|
||||
Reference in New Issue
Block a user