[−][src]Struct sloggers::file::FileLoggerConfig
The configuration of FileLoggerBuilder
.
Fields
level: Severity
Log level.
format: Format
Log record format.
source_location: SourceLocation
Source code location
timezone: TimeZone
Time Zone.
timestamp_template: String
Format string for the timestamp in the path. The string is formatted using strftime
Default: "%Y%m%d_%H%M", example: "20180918_1127"
path: PathBuf
Log file path template.
It will be used as-is, with the following transformation:
All occurrences of the substring "{timestamp}" will be replaced with the current timestamp
formatted according to timestamp_template
. The timestamp will respect the timezone
setting.
channel_size: usize
Asynchronous channel size
truncate: bool
Truncate the file or not
rotate_size: u64
Log file rotation size.
For details, see the documentation of rotate_size
.
rotate_keep: usize
Maximum number of rotated log files to keep.
For details, see the documentation of rotate_keep
.
rotate_compress: bool
Whether to compress or not compress rotated files.
For details, see the documentation of rotate_compress
.
The default value is false
.
overflow_strategy: OverflowStrategy
Whether to drop logs on overflow.
The possible values are drop
, drop_and_report
, or block
.
The default value is drop_and_report
.
Trait Implementations
impl Config for FileLoggerConfig
[src]
type Builder = FileLoggerBuilder
Logger builder.
fn try_to_builder(&self) -> Result<Self::Builder>
[src]
fn build_logger(&self) -> Result<Logger>
[src]
impl Default for FileLoggerConfig
[src]
impl Clone for FileLoggerConfig
[src]
fn clone(&self) -> FileLoggerConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for FileLoggerConfig
[src]
impl Serialize for FileLoggerConfig
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for FileLoggerConfig
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for FileLoggerConfig
impl Unpin for FileLoggerConfig
impl Sync for FileLoggerConfig
impl RefUnwindSafe for FileLoggerConfig
impl UnwindSafe for FileLoggerConfig
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,