Switch the local message source from imuxsock to imjournal

The imuxsock module is left enabled so it is easy to swich back to it
and because systemd drops a file into /etc/rsyslog.d which only
imuxsock can parse.
This commit is contained in:
Tomas Heinrich 2013-06-04 20:18:19 +02:00
parent db527059e0
commit d9d32ce255
2 changed files with 20 additions and 3 deletions

View File

@ -5,7 +5,9 @@
#### MODULES ####
# The imjournal module bellow is now used as a message source instead of imuxsock.
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imjournal # provides access to the systemd journal
$ModLoad imklog # provides kernel logging support (previously done by rklogd)
#$ModLoad immark # provides --MARK-- message capability
@ -20,6 +22,9 @@ $ModLoad imklog # provides kernel logging support (previously done by rklogd)
#### GLOBAL DIRECTIVES ####
# Where to place auxiliary files
$WorkDirectory /var/lib/rsyslog
# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
@ -30,6 +35,13 @@ $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf
# Turn off message reception via local log socket;
# local messages are retrieved through imjournal now.
$OmitLocalLogging on
# File to store the position in the journal
$StateFile imjournal.state
#### RULES ####
@ -69,7 +81,6 @@ local7.* /var/log/boot.log
#
# 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.
#$WorkDirectory /var/lib/rsyslog # where to place spool files
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown

View File

@ -321,8 +321,10 @@ install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/rsyslog.conf
install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/rsyslog
install -p -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/syslog
#get rid of *.la
rm %{buildroot}%{_libdir}/rsyslog/*.la
# get rid of *.la
rm -f %{buildroot}%{_libdir}/rsyslog/*.la
# get rid of socket activation by default
sed -i '/^Sockets/s/^/;/;/^Alias/s/^/;/' %{buildroot}%{_unitdir}/rsyslog.service
%post
for n in /var/log/{messages,secure,maillog,spooler}
@ -479,6 +481,10 @@ done
- drop the option for backwards compatibility from the
sysconfig file - it is no longer supported
- call autoreconf to prepare the snapshot for building
- switch the local message source from imuxsock to imjournal
the imuxsock module is left enabled so it is easy to swich back to
it and because systemd drops a file into /etc/rsyslog.d which only
imuxsock can parse
* Wed Apr 10 2013 Tomas Heinrich <theinric@redhat.com> 7.3.10-1
- rebase to 7.3.10