#rolling #logging-tracing #tracing #logging #debugging

tracing-rolling-file-inc

A rolling file appender with customizable rolling conditions

1 unstable release

0.0.2 Feb 1, 2024
0.0.1 Jan 28, 2024

#509 in Science

MIT/Apache

26KB
465 lines

tracing-rolling-file-inc

Latest Version Rust Documentation minimum rustc: 1.42

A rolling file appender with customizable rolling conditions,optimized the output method of file names to make them more scientific. based on tracing-rolling-file.

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

use tracing_rolling_file_inc::*;
let file_appender =
    RollingFileAppenderBase::new("./logs", "log", RollingConditionBase::new()
        .max_size(1024)
        .daily(), 50)?;

Dependencies

~3.5–5MB
~89K SLoC