Struct file_rotate::FileRotate
source · [−]pub struct FileRotate<S: SuffixScheme> { /* private fields */ }
Expand description
The main writer used for rotating logs.
Implementations
pub fn new<P: AsRef<Path>>(
path: P,
suffix_scheme: S,
content_limit: ContentLimit,
compression: Compression
) -> Self
pub fn new<P: AsRef<Path>>(
path: P,
suffix_scheme: S,
content_limit: ContentLimit,
compression: Compression
) -> Self
Create a new FileRotate.
The basename of the path
is used to create new log files by appending an extension of the
form .N
, where N is 0..=max_files
.
content_limit
specifies the limits for rotating a file.
Panics
Panics if bytes == 0
or lines == 0
.
Trait Implementations
Write a buffer into this writer, returning how many bytes were written. Read more
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
Attempts to write an entire buffer into this writer. Read more
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Writes a formatted string into this writer, returning any error encountered. Read more