| https:///weradocs/Linux_Logs.shtml |
Please add the following lines to /etc/syslog.conf:
# # all WERA stm - messages in one file # user.info -/home/wera/weralogs/cron.log |
Please add the following lines to /etc/logrotate.d/syslog:
/home/wera/weralogs/cron.log {
compress
daily
dateext
maxage 365
rotate 99
missingok
notifempty
size +20M
create 644 root root
sharedscripts
postrotate
/etc/init.d/syslog reload
endscript
}
|
Modify /etc/logrotate.conf:
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# uncomment these to switch compression to bzip2
#compresscmd /usr/bin/bzip2
#uncompresscmd /usr/bin/bunzip2
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own lastlog or wtmp -- we'll rotate them here
#/var/log/wtmp {
# monthly
# create 0664 root utmp
# rotate 1
#}
|
| BACK |