pub struct RotatingFile { /* private fields */ }
Expand description

A thread-safe rotating file with customizable rotation behavior.

Implementations

Creates a new RotatingFile.

Arguments
  • root_dir The directory to store files.
  • size Max size(in kilobytes) of the file after which it will rotate, None and 0 mean unlimited.
  • interval How often(in seconds) to rotate, 0 means unlimited.
  • compression Available values are GZip and Zip, default to None
  • date_format uses the syntax from chrono https://docs.rs/chrono/latest/chrono/format/strftime/, default to %Y-%m-%d-%H-%M-%S
  • prefix File name prefix, default to empty
  • suffix File name suffix, default to .log

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.