M: Application logs grow without rotation - #4
- Dominant language
- Shell
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
# Description
The `challenge-m.sh` script writes to the application log file but **never rotates it**.
As a result, `logs/app.log` can grow indefinitely, which may eventually consume disk space and cause operational issues.
The script must automatically handle log rotation during execution.
## Acceptance Criteria
* [ ] Check the size of `logs/app.log` during script execution
* [x] If the log file size exceeds **1MB**, rotate it
* [x] Rotated log files must be stored in the `logs/` directory
* [x] Keep **only the last 3 rotated log files**
* [ ] Automatically remove older rotated logs
## Notes
* A simple rotation strategy is sufficient
* Do **not** use external tools (e.g. `logrotate`)
* The script should continue normal execution after rotation
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.