diff --git a/Cargo.lock b/Cargo.lock index 540a4efa..b74d3842 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -369,9 +369,9 @@ dependencies = [ [[package]] name = "file-rotate" -version = "0.5.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c2536ee16e019920dbef075aa3edc7efa8029fe17fe4330dd9690ee155a411" +checksum = "f8071df7315b1cd4006ce687043f393cca212761889b3626c1444ae06e8f72d0" dependencies = [ "chrono", "flate2 1.0.22", diff --git a/Cargo.toml b/Cargo.toml index 653f40e7..4872ac6e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ strum_macros = "0.23" minicbor = "0.13" # feature logs -file-rotate = { version = "0.5.3", optional = true } +file-rotate = { version = "0.6.0", optional = true } # feature: webhook reqwest = { version = "0.11", optional = true, features = ["blocking", "json"] } diff --git a/src/sinks/logs/setup.rs b/src/sinks/logs/setup.rs index 42480c67..f9b5afbc 100644 --- a/src/sinks/logs/setup.rs +++ b/src/sinks/logs/setup.rs @@ -1,5 +1,5 @@ use file_rotate::{ - suffix::{FileLimit, TimestampSuffixScheme}, + suffix::{AppendTimestamp, FileLimit}, ContentLimit, FileRotate, }; use std::{io::Write, path::PathBuf, str::FromStr}; @@ -37,7 +37,7 @@ fn build_witer(config: &Config) -> Result<impl Write, Error> { None => std::env::current_dir()?, }; - let suffix_scheme = TimestampSuffixScheme::default(FileLimit::MaxFiles( + let suffix_scheme = AppendTimestamp::default(FileLimit::MaxFiles( config.max_total_files.unwrap_or(DEFAULT_MAX_TOTAL_FILES), ));