Skip to content

Commit ed09753

Browse files
kaffarelltpoliaw
andauthored
Update tracing-appender/src/rolling.rs
Co-authored-by: Peter Holloway <[email protected]>
1 parent 578fcc8 commit ed09753

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tracing-appender/src/rolling.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,8 @@ impl Inner {
605605
let created = metadata.created().ok().or_else(|| {
606606
let mut datetime = filename;
607607
if let Some(prefix) = &self.log_filename_prefix {
608-
datetime = datetime.strip_prefix(&format!("{prefix}."))?;
608+
datetime = datetime.strip_prefix(prefix)?;
609+
datetime = datetime.strip_prefix('.')?;
609610
}
610611
if let Some(suffix) = &self.log_filename_suffix {
611612
datetime = datetime.strip_suffix(&format!(".{suffix}"))?;

0 commit comments

Comments
 (0)