pub struct Logging {
pub log_level: LogLevel,
pub log_to_console: bool,
pub log_to_file: bool,
pub log_directory: PathBuf,
pub log_to_syslog: bool,
pub syslog_host: String,
pub syslog_port: u16,
pub syslog_transport: SyslogTransport,
pub log_as_json: bool,
}
Expand description
Model Definition for the Logging Configuration
Fields§
§log_level: LogLevel
What level of logging should we have?
log_to_console: bool
Should we log to console?
log_to_file: bool
Should we log to files on the server?
log_directory: PathBuf
If log_to_file: true
, what is the directory to store logs?
log_to_syslog: bool
Should logs be sent to a syslog server?
syslog_host: String
If log_to_syslog: true
, provide hostname/IP of the syslog server?
syslog_port: u16
If log_to_syslog: true
, provide port of the syslog server?
syslog_transport: SyslogTransport
If log_to_syslog: true
, provide transport for syslog server?
log_as_json: bool
Log in JSON format?
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Logging
impl<'de> Deserialize<'de> for Logging
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
Auto Trait Implementations§
impl Freeze for Logging
impl RefUnwindSafe for Logging
impl Send for Logging
impl Sync for Logging
impl Unpin for Logging
impl UnwindSafe for Logging
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> 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