diff --git a/rsyslog.conf b/rsyslog.conf index 54a251c..ba20686 100644 --- a/rsyslog.conf +++ b/rsyslog.conf @@ -7,7 +7,7 @@ #### GLOBAL DIRECTIVES #### # Where to place auxiliary files -global(workDirectory="/run/log/journal") +global(workDirectory="/var/lib/rsyslog") # Use default timestamp format module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat") @@ -18,19 +18,11 @@ module(load="imuxsock" # provides support for local system logging (e.g. via SysSock.Use="off") # Turn off message reception via local log socket; # local messages are retrieved through imjournal now. module(load="imjournal" # provides access to the systemd journal - StateFile="imjournal.state") # File to store the position in the journal + StateFile="/run/log/imjournal.state") # File to store the position in the journal #module(load="imklog") # reads kernel messages (the same are read from journald) #module(load="immark") # provides --MARK-- message capability -# Provides UDP syslog reception -# for parameters see http://www.rsyslog.com/doc/imudp.html -#module(load="imudp") # needs to be done just once -#input(type="imudp" port="514") - -# Provides TCP syslog reception -# for parameters see http://www.rsyslog.com/doc/imtcp.html -#module(load="imtcp") # needs to be done just once -#input(type="imtcp" port="514") +$imjournalRatelimitInterval 0 # Include all config files in /etc/rsyslog.d/ include(file="/etc/rsyslog.d/*.conf" mode="optional") @@ -62,17 +54,3 @@ uucp,news.crit /var/log/spooler # Save boot messages also to boot.log local7.* /var/log/boot.log - - -# ### sample forwarding rule ### -#action(type="omfwd" -# # An on-disk queue is created for this action. If the remote host is -# # down, messages are spooled to disk and sent when it is up again. -#queue.filename="fwdRule1" # unique name prefix for spool files -#queue.maxdiskspace="1g" # 1gb space limit (use as much as possible) -#queue.saveonshutdown="on" # save messages to disk on shutdown -#queue.type="LinkedList" # run asynchronously -#action.resumeRetryCount="-1" # infinite retries if host is down -# # Remote Logging (we use TCP for reliable delivery) -# # remote_host is: name/ip, e.g. 192.168.0.1, port optional e.g. 10514 -#Target="remote_host" Port="XXX" Protocol="tcp") diff --git a/rsyslog.log b/rsyslog.log index b101e32..f723d01 100644 --- a/rsyslog.log +++ b/rsyslog.log @@ -4,7 +4,12 @@ /var/log/secure /var/log/spooler { + maxage 365 + rotate 30 + notifempty + copytruncate missingok + size +4096k sharedscripts postrotate /usr/bin/systemctl kill -s HUP rsyslog.service >/dev/null 2>&1 || true diff --git a/rsyslog.spec b/rsyslog.spec index 75cbefe..dc98b90 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -4,7 +4,7 @@ Name: rsyslog Version: 8.1907.0 -Release: 4 +Release: 5 Summary: The rocket-fast system for log processing License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ @@ -357,6 +357,9 @@ done %{_mandir}/man1/rscryutil.1.gz %changelog +* Tue Jan 14 2020 openEuler Buildteam - 8.1907.0-5 +- del unuse info + * Wed Nov 27 2019 chengquan - 8.1907.0-4 - Type:bugfix - ID:NA