Revert "Add log rotation (#6564)" (#6627)

This reverts commit 6eb2eb81c5.
This commit is contained in:
Bastian Köcher
2020-07-10 12:43:41 +02:00
committed by GitHub
parent 150ef0a40a
commit 64114267b2
7 changed files with 84 additions and 50 deletions
+2 -11
View File
@@ -21,10 +21,9 @@
use crate::arg_enums::Database;
use crate::error::Result;
use crate::{
DatabaseParams, ImportParams, KeystoreParams, NetworkParams, NodeKeyParams,
init_logger, DatabaseParams, ImportParams, KeystoreParams, NetworkParams, NodeKeyParams,
OffchainWorkerParams, PruningParams, SharedParams, SubstrateCli,
};
use crate::logger::{LogRotationOpt, init_logger};
use names::{Generator, Name};
use sc_client_api::execution_extensions::ExecutionStrategies;
use sc_service::config::{
@@ -489,13 +488,6 @@ pub trait CliConfiguration: Sized {
Ok(self.shared_params().log_filters().join(","))
}
/// Get the log directory for logging.
///
/// By default this is retrieved from `SharedParams`.
fn log_rotation_opt(&self) -> Result<LogRotationOpt> {
Ok(self.shared_params().log_rotation_opt().clone())
}
/// Initialize substrate. This must be done only once.
///
/// This method:
@@ -505,12 +497,11 @@ pub trait CliConfiguration: Sized {
/// 3. Initialize the logger
fn init<C: SubstrateCli>(&self) -> Result<()> {
let logger_pattern = self.log_filters()?;
let log_rotation_opt = self.log_rotation_opt()?;
sp_panic_handler::set(&C::support_url(), &C::impl_version());
fdlimit::raise_fd_limit();
init_logger(&logger_pattern, Some(log_rotation_opt))?;
init_logger(&logger_pattern);
Ok(())
}