对于linux操作系统修改文件/etc/logrotate.conf日志配置策略。
# see "man logrotate" for details
# global options do not affect preceding include directives
# rotate log files monthly
#weekly
monthly #把周修改成月
# use the adm group by default, since this is the owning group
# of /var/log/syslog.
su root adm
# keep 6 months worth of backlogs
#rotate 4
rotate 6 #保留6个月的日志
# create new (empty) log files after rotating old ones
create
# use date as a suffix of the rotated file
#dateext
# uncomment this if you want your log files compressed
#compress
# packages drop log rotation information into this directory
include /etc/logrotate.d
非特殊说明,本文版权归HPay所有,转载请注明出处.
本文类型: Java工具