https://unix.stackexchange.com/questions/261696/logrotation-rotate-and-maxage-command https://blog.gsterling.de/2017/10/03/logrotate-misconceptions-about-maxsize-and-size/
29 lines
737 B
Plaintext
29 lines
737 B
Plaintext
# Generated by apptask
|
|
|
|
# keep upto 5 rotated logs. rotation triggered weekly or ahead of time if size is > 10M
|
|
<%= volumePath %>/*.log <%= volumePath %>/*/*.log <%= volumePath %>/*/*/*.log {
|
|
rotate 5
|
|
weekly
|
|
maxage 14
|
|
compress
|
|
maxsize 10M
|
|
missingok
|
|
delaycompress
|
|
# this truncates the original log file and not the rotated one
|
|
copytruncate
|
|
}
|
|
|
|
/home/yellowtent/platformdata/logs/<%= appId %>/*.log {
|
|
# only keep one rotated file, we currently do not send that over the api
|
|
rotate 1
|
|
weekly
|
|
maxage 14
|
|
maxsize 10M
|
|
missingok
|
|
# we never compress so we can simply tail the files
|
|
nocompress
|
|
# this truncates the original log file and not the rotated one
|
|
copytruncate
|
|
}
|
|
|