File Logging
Ricochet writes logs to files and rotates and compresses them for you.
You set this up in the [logs] section of ricochet-config.toml.
If ricochet-config.toml has no [logs] section, ricochet picks defaults based on how you installed it:
- Kubernetes backend: File logging is off. Logs go to stdout so your cluster can collect them.
- Host & Container: File logging is on, with daily rotation and gzip compression.
Configuration
Section titled “Configuration”Add a [logs] section to ricochet-config.toml to change how ricochet logs.
This example rotates logs every hour and compresses them.
It keeps at most 100 files and deletes any file older than a week.
[logs]level = "debug"file_logging = truerotation = "hourly"compress = truemax_files = 100max_age_days = 7Configuration Options
Section titled “Configuration Options”-
level: How much detail to log (default:"info")"trace": Most detail, includes all debug output"debug": Detailed output for finding problems"info": General messages (default)"warn": Warnings"error": Least detail, errors only
-
file_logging: Turn file logging on or off (default:truefor all installs except Kubernetes) -
rotation: How often to rotate logs (default:"daily")"hourly": Rotate logs every hour"daily": Rotate logs every day"never": Never rotate (one log file)
-
compress: Compress rotated logs with gzip (default:true) -
max_files: Most rotated log files to keep (default: no limit) -
max_age_days: Oldest age in days a rotated log file may reach (default: no limit)
Logs Location
Section titled “Logs Location”Ricochet stores log files in RICOCHET_HOME/logs/, named by rotation schedule:
- Daily rotation:
ricochet.log-yyyy-MM-dd(e.g.,ricochet.log-2026-02-21) - Hourly rotation:
ricochet.log-yyyy-MM-dd-HH(e.g.,ricochet.log-2026-02-21-08) - No rotation:
ricochet.log
Log Rotation and Cleanup
Section titled “Log Rotation and Cleanup”Each time ricochet rotates logs, it cleans up in this order:
- Delete all log files older than
max_age_days(if set) - Delete the oldest files beyond the
max_fileslimit (if set) - Compress any rotated files that are not yet compressed with gzip (except the current log file)
Old logs are deleted before compression runs, which keeps disk use low.
Pair file logging with OpenTelemetry tracing to get a full view of what your server does: