tracing-logrotate

Crates.iotracing-logrotate
lib.rstracing-logrotate
version0.1.0
created_at2025-08-17 09:04:06.024203+00
updated_at2025-08-17 09:04:06.024203+00
descriptiontracing logfile writer with rotation and expiry
homepage
repositoryhttps://salsa.debian.org/dgit-team/tag2upload-service-manager
max_upload_size
id1799255
size62,339
Sean Whitton (spwhitton)

documentation

README

Improved replacement for tracing_appender::rolling

Like tracing_appender::rolling but:

  • Can write multiple series of output files, each with a different filter level.
  • With some bugs fixed.
  • We use the word rotate not the unidiomatic roll.

Features

  • Needs to "own" the output directory, so that it can manage all files *.log.
  • Guarantees not to leave old stale logfiles from previous configurations, even if the configuration is changed.
  • But, configuration change needs recreation of the Appender.

Rationale

Debian's tag2upload-service-manager uses rocket so we tried to use tracing for logging. However, we have come to the conclusion that tracing is not fit for purpose.

One of the biggest issues is that the model is not documented. The composition of the various pieces is confusing, and, we strongly suspect, not fully coherent. See #2141; this also seems to be generating many bug reports from confused users who haven't analysed the situation as thoroughly as was done there. For this reason, we don't want to try to have multiple Subscribers or try to use Layers. Instead, we do all the level filtering directly, here.

We tried using RollingFileAppender but tripped over a bug that broke the tests: it doesn't rotate logfiles until the first entry is written (#2937). Other tickets in the upstream tracker aren't encouraging, eg #1932.

Commit count: 1812

cargo fmt