pub struct LogFile<'a> { /* private fields */ }
Expand description

Information about the active log file.

Implementations§

source§

impl<'a> LogFile<'a>

source

pub fn path(&self) -> &Path

Returns the path to the log file.

source

pub fn len(&self) -> u64

👎Deprecated since 0.9.1: Please use the len_estimate function instead

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.

source

pub fn len_estimate(&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.

source

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.

Trait Implementations§

source§

impl<'a> Debug for LogFile<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DebugAny for T
where T: Any + Debug,

§

impl<T> UnsafeAny for T
where T: Any,