Skip to content

Add daemon log management with OS-appropriate rotation #19

Description

@rikettsie

Context

The daemon currently discards all log output and there's no visibility into activity info, errors, or warnings. Logs should be written to OS typical locations instead, with automatic rotation so they don't grow indefinitely.

Goal

Route daemon logs to the appropriate OS log file (or sink service), with rotation handled either by the OS or in-process.

Acceptance criteria

  • On Linux, logs are emitted to the systemd journal via tracing-journald; rotation is handled by journald automatically — no configuration required from ringdrop;
  • A log_depth_days field in config.json controls how many daily log files are retained on macOS and Windows; defaults to 7 ;
  • On macOS, logs are written to ~/Library/Logs/ringdrop/daemon.log via tracing-appender;
  • On Windows, logs are written to %APPDATA%\ringdrop\logs\daemon.log via tracing-appender;
  • The log directory is created automatically if it does not exist;
  • RUST_LOG still controls the verbosity level on all platforms;
  • The README.md documents where logs are written on each platform.

Out of scope

  • Configurable log paths or retention policies;
  • Log shipping or aggregation (no Datadog, Splunk or other remote collectors at the moment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement of existing function/behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions