pub struct Logger {
pub level: Option<LogLevel>,
pub log_path: PathBuf,
pub show_level: Option<bool>,
pub show_log_origin: Option<bool>,
pub module: Option<String>,
}
Expand description
Describes the configuration option for the logging capability. logger can only be constructed once and cannot update after configuration
Fields§
§level: Option<LogLevel>
Set the level. The possible values are case-insensitive. Enum: [Error Warning Info Debug]
log_path: PathBuf
Path to the named pipe or file for the human readable log output. Required: true
show_level: Option<bool>
Whether or not to output the level in the logs.
show_log_origin: Option<bool>
Whether or not to include the file path and line number of the log’s origin.
module: Option<String>
The module path to filter log messages by. example: api_server::request
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Logger
impl<'de> Deserialize<'de> for Logger
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
Source§impl Ord for Logger
impl Ord for Logger
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Logger
impl PartialOrd for Logger
impl Eq for Logger
impl StructuralPartialEq for Logger
Auto Trait Implementations§
impl Freeze for Logger
impl RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnwindSafe for Logger
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