Expand description

A rolling file appender with customizable rolling conditions. Includes built-in support for rolling conditions on date/time (daily, hourly, every minute) and/or size.

Follows a Debian-style naming convention for logfiles, using basename, basename.1, …, basename.N where N is the maximum number of allowed historical logfiles.

This is useful to combine with the tracing crate and tracing_appender::non_blocking::NonBlocking – use it as an alternative to tracing_appender::rolling::RollingFileAppender.

§Examples

let file_appender = RollingFileAppenderBase::new(
    "./logs",
    "log",
    RollingConditionBase::new().daily(),
    9
).unwrap();

Re-exports§

Modules§

  • Implements a rolling condition based on a certain frequency and/or a size limit. The default condition is to rotate daily.

Structs§

  • Writes data to a file, and “rolls over” to preserve older data in a separate set of files. Old files have a Debian-style naming scheme where we have base_filename, base_filename.1, …, base_filename.N where N is the maximum number of rollover files to keep.

Enums§

Traits§