pub struct LogConfig {
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<Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Config
impl Serialize for Config
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more