mirror of
https://github.com/GrapheneOS/infrastructure.git
synced 2025-11-24 08:43:11 -05:00
logrotate: use better size+time rotation approach
This commit is contained in:
parent
5f2e4a45c3
commit
c9b84fdb79
2 changed files with 16 additions and 18 deletions
|
|
@ -1,14 +1,8 @@
|
|||
# see "man logrotate" for details
|
||||
# rotate log files daily
|
||||
rotate 16
|
||||
daily
|
||||
maxage 10
|
||||
maxsize 16M
|
||||
|
||||
# keep 10 days worth of backlogs
|
||||
rotate 10
|
||||
|
||||
# restrict maximum size of log files
|
||||
#size 20M
|
||||
|
||||
# create new (empty) log files after rotating old ones
|
||||
create
|
||||
|
||||
compress
|
||||
|
|
@ -18,13 +12,9 @@ compressext .zst
|
|||
compressoptions -9 --long
|
||||
delaycompress
|
||||
|
||||
# Logs are moved into directory for rotation
|
||||
# olddir /var/log/archive
|
||||
|
||||
# Ignore pacman saved files
|
||||
tabooext + .pacorig .pacnew .pacsave
|
||||
|
||||
# Arch packages drop log rotation information into this directory
|
||||
include /etc/logrotate.d
|
||||
|
||||
/var/log/wtmp /var/log/btmp {}
|
||||
|
||||
include /etc/logrotate.d
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
/var/log/nginx/access.log /var/log/nginx/error.log {
|
||||
/var/log/nginx/access.log {
|
||||
missingok
|
||||
sharedscripts
|
||||
maxsize 1G
|
||||
nodelaycompress
|
||||
postrotate
|
||||
syslog-ng-ctl reopen >/dev/null
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/nginx/error.log {
|
||||
missingok
|
||||
maxsize 64M
|
||||
nodelaycompress
|
||||
maxsize 2G
|
||||
postrotate
|
||||
syslog-ng-ctl reopen >/dev/null
|
||||
endscript
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue