pub struct LogFile<'a> { /* private fields */ }
Expand description
Information about the active log file.
Implementations
sourceimpl<'a> LogFile<'a>
impl<'a> LogFile<'a>
sourcepub fn len(&self) -> u64
pub fn len(&self) -> u64
Returns an estimate of the log file’s current size.
This is calculated by taking the size of the log file when it is opened and adding the number of bytes written. It may be inaccurate if any writes have failed or if another process has modified the file concurrently.
sourcepub fn roll(&mut self)
pub fn roll(&mut self)
Triggers the log file to roll over.
A policy must call this method when it wishes to roll the log. The appender’s handle to the file will be closed, which is necessary to move or delete the file on Windows.
If this method is called, the log file must no longer be present on disk when the policy returns.
Auto Trait Implementations
impl<'a> RefUnwindSafe for LogFile<'a>
impl<'a> Send for LogFile<'a>
impl<'a> Sync for LogFile<'a>
impl<'a> Unpin for LogFile<'a>
impl<'a> !UnwindSafe for LogFile<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more