How do I set custom logrotate ?

In Artifakt Custom json, add this configuration :

"logrotate": {
"rotate": "7",
"log_dirs": [ "/srv/www/magento/current/magento/src/var/log"]
},
  • rotate  : number of days you keep the logs. In this example, logs older 7 days will be removed (by default, we set this option to 30 days).
  • Log_dirs : all files inside this directory will be archived (logrotate applied). It's an array so you can define another directory separated by comma. 

By default, the option compress is activated.

IMPORTANT : to applied logrotate, you have to launch a new deploy.

Was this article helpful?
1 out of 1 found this helpful