pub struct Config {
pub filter: Option<String>,
pub color: bool,
pub file: PathBuf,
pub log_dir: PathBuf,
pub log_to_file: bool,
pub log_to_stdout: bool,
pub emit_sentry_breadcrumbs: Option<bool>,
pub extra: HashMap<String, ExtraLoggerConfig>,
}
Expand description
The whole CKB logger configuration.
This struct is used to build Logger
.
Include configurations of the main logger and any number of extra loggers.
Fields§
§filter: Option<String>
An optional string which is used to build env_logger::Filter for the main logger.
If the value is None
, no env_logger::Filter will be used.
color: bool
Colorize the output which was written into the stdout.
file: PathBuf
The log file of the main logger.
log_dir: PathBuf
The directory where to store all log files.
log_to_file: bool
Output the log records of the main logger into a file or not.
log_to_stdout: bool
Output the log records of the main logger into the stdout or not.
An optional bool to control whether or not emit Sentry Breadcrumbs.
if the value is None
, not emit Sentry Breadcrumbs.
extra: HashMap<String, ExtraLoggerConfig>
Add extra loggers.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more