Struct flexi_logger_rotate_writer::RotateLogWriterBuilder[][src]

pub struct RotateLogWriterBuilder { /* fields omitted */ }

Builder for RotateLogWriter.

Implementations

impl RotateLogWriterBuilder[src]

#[must_use]pub const fn print_message(self) -> Self[src]

Makes the RotateLogWriter print an info message to stdout when a new file is used for log-output.

#[must_use]pub fn format(self, format: FormatFunction) -> Self[src]

Makes the RotateLogWriter use the provided format function for the log entries, rather than the default_format.

#[must_use]pub fn directory<P: Into<PathBuf>>(self, directory: P) -> Self[src]

Specifies a folder for the log files.

If the specified folder does not exist, the initialization will fail. By default, the log files are created in the folder where the program was started.

#[must_use]pub fn suffix<S: Into<String>>(self, suffix: S) -> Self[src]

Specifies a suffix for the log files. The default is “log”.

#[must_use]pub fn discriminant<S: Into<String>>(self, discriminant: S) -> Self[src]

The specified String is added to the log file name.

#[must_use]pub fn basename<S: Into<String>>(self, basename: S) -> Self[src]

The specified String is used as the basename of the log file name, instead of the program name.

The specified String will be used on linux systems to create in the current folder a symbolic link to the current log file.

#[must_use]pub const fn use_windows_line_ending(self) -> Self[src]

Use Windows line endings, rather than just \n.

#[must_use]pub const fn use_buffering(self, buffer: bool) -> Self[src]

Define if buffering should be used.

By default, every log line is directly written to the output file, without buffering. This allows seeing new log lines in real time.

#[must_use]pub const fn buffer_with_capacity(self, capacity: usize) -> Self[src]

Activates buffering, and uses a buffer with the specified capacity.

pub fn try_build(self) -> Result<RotateLogWriter, FlexiLoggerError>[src]

Produces the RotateLogWriter.

Trait Implementations

impl Default for RotateLogWriterBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.