Red Hat Bugzilla – Bug 450949
RFE: yum's syslog logging facility should be a yum.conf option
Last modified: 2014-01-21 18:03:02 EST
In config.py, the facility that yum uses when it syslogs messages is hardcoded
to LOG_DAEMON. This should be configurable via /etc/yum.conf (with LOG_DAEMON
being the default), so that the sysadmin has the ability to direct yum's log
messages to a separate file.
Yes, all of yum's log messages are already in a separate file, in
/var/log/yum.log. But /var/log/yum.log is written directly by yum, not by
rsyslog, so it's not possible to use rsyslog's advanced
formatting/classification features. E.g.:
$ cat /etc/rsyslog.d/yum.conf
$ tail /var/log/2008/11/yum.log.2008-06-11
2008-06-11T16:12:14.043954-04:00 localhost yum: Updated:
2008-06-11T16:12:14.142591-04:00 localhost yum: Updated:
2008-06-11T16:12:15.394277-04:00 localhost yum: Updated: rpmlint-0.83-1.fc9.noarch
I could give you a simple patch to make the facility configurable, but
validating that the user has set it to a valid facility is probably beyond my
meager python skills...
Rsyslog can filter on the program name that's doing the logging, not just by
facility - is it really necessary to make the logging facility configurable with
this in mind?
Yes, rsyslog can filter on the program name, but doing so is going to take a
performance hit. (For a lightly-loaded server, the hit should be negligible,
but for a very busy server, or a centralized logging server, the hit might be
The facility is the easiest and most efficient way to filter the messages.
Adding the ability to customize the facility yum syslogs using looks to be
trivial, which is why I suggested it.
Other than a general opposition to feature creep, do you have a particular
concern over adding this feature?
Ok, the summary/description is very wrong here:
yum.conf already has:
syslog_ident = Option()
syslog_facility = Option('LOG_DAEMON')
...however yum never calls syslog on it's own, so it gets the default (LOG_USER and no ident). yum-updatesd uses the syslog config.
I've tied the config. to the syslog.openlog() inside yum upstream.