-
-
Notifications
You must be signed in to change notification settings - Fork 240
Log files accumulate rapidly and consume excessive disk space #1154
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Fresh creates a new log file for every session (per PID), but never cleans up old ones. This causes the ~/.local/state/fresh/logs/ directory to grow very quickly — in my case, over 1 GB of logs accumulated within just 2 days.
Steps to Reproduce
- Use Fresh normally for a few days
- Check
~/.local/state/fresh/logs/ - Observe hundreds of log files (e.g.
fresh-<PID>.log,status-<PID>.log,warnings-<PID>.log) totaling several hundred MB to GB
Example
$ du -sh ~/.local/state/fresh/
1.1G /home/user/.local/state/fresh/logs/
$ ls ~/.local/state/fresh/logs/ | wc -l
503
$ ls -lhS ~/.local/state/fresh/logs/ | head -5
.rw-rw-r-- 35M fresh-3767.log
.rw-rw-r-- 30M fresh-5271.log
.rw-rw-r-- 22M fresh-3691.log
.rw-rw-r-- 14M fresh-3556.log
.rw-rw-r-- 12M fresh-4947.log
Expected Behavior
Log files should either:
- be limited in total size / number of files (log rotation), or
- respect a
log_levelconfig option so users can reduce verbosity
Suggested Fix / Feature Request
Please consider adding one or more of the following:
- Log retention setting in
config.json, e.g.:{ "log_retention_days": 7 } - Log rotation — keep only the last N sessions or cap total log directory size
- Log level config — allow users to set
log_level: "warn"or"error"to reduce output size significantly - Cleanup on startup — automatically delete logs older than X days when Fresh launches
Environment
- OS: Linux
- Fresh version: fresh 0.2.9
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working