How to Install and Use logrotate
Logs grow quietly. logrotate cuts, compresses and drops old files based on a rule.
Steps
On Ubuntu it is usually installed. Check the binary:
logrotate --versionCreate a rule for your app (example):
sudo nano /etc/logrotate.d/my-app