Struct flexi_logger_rotate_writer::RotateLogWriterBuilder [−][src]
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.
#[must_use]pub fn create_symlink<P: Into<PathBuf>>(self, symlink: P) -> Self
[src]
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
impl RefUnwindSafe for RotateLogWriterBuilder
impl Send for RotateLogWriterBuilder
impl Sync for RotateLogWriterBuilder
impl Unpin for RotateLogWriterBuilder
impl UnwindSafe for RotateLogWriterBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,