mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 22:37:57 +00:00
Make init_logging more easily usable (#6620)
Instead of requiring the `LogRotationOpt`, it now requires an `Option<LogRotationOpt>`. This makes it much more easy to use the interface when someone isn't interested on the `LogRotationOpt`'s
This commit is contained in:
@@ -490,10 +490,10 @@ pub trait CliConfiguration: Sized {
|
||||
}
|
||||
|
||||
/// 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())
|
||||
fn log_rotation_opt(&self) -> Result<LogRotationOpt> {
|
||||
Ok(self.shared_params().log_rotation_opt().clone())
|
||||
}
|
||||
|
||||
/// Initialize substrate. This must be done only once.
|
||||
@@ -510,7 +510,7 @@ pub trait CliConfiguration: Sized {
|
||||
sp_panic_handler::set(&C::support_url(), &C::impl_version());
|
||||
|
||||
fdlimit::raise_fd_limit();
|
||||
init_logger(&logger_pattern, log_rotation_opt)?;
|
||||
init_logger(&logger_pattern, Some(log_rotation_opt))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user