strip ansi escapes from systemd-managed daemon logs

This commit is contained in:
damocles 2026-08-30 23:23:00 +02:00
commit 5f197a38ee
11 changed files with 44 additions and 0 deletions

View file

@ -348,6 +348,10 @@ async fn main() -> Result<()> {
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("warn")),
)
.with_writer(std::io::stderr)
// This is a systemd-managed daemon — stderr always goes to journald,
// never a human terminal, and journald doesn't strip ANSI escapes:
// they land in victorialogs as raw byte-array spam otherwise.
.with_ansi(false)
.init();
let service = ScreenMcp.serve(stdio()).await?;