Red Hat Bugzilla – Bug 197872
yum forgets to log
Last modified: 2014-01-21 17:54:54 EST
Description of problem:
After recent changes even if there is a line 'logfile=/var/log/yum.log'
nothing shows up in that logfile. Neither 'man yum.conf' nor
a content of /etc/yum.conf suggests what could cause that and/or
how to revert it. Transaction entries in /var/log/yum.log actually
provide a valuable record in tracking system modifications.
Version-Release number of selected component (if applicable):
Indeed -- this is likely a side effect of replacing all the logging code.
Adding jbowes to the cc list
Created attachment 132073 [details]
Get logging working for files and syslog
Yeah, this is from the new logging. The attached patch gets things working,
however it displays 'Installed' messages twice, but 'Erased' messages only
once. I'm not sure what that is from.
Created attachment 132079 [details]
The cruft free patch
Here is the proper patch. The previous one contained extra cruft.
Indeed, after applying a patch from comment #3 yum starts
logging again. Also I can observe as well that both for 'Installed'
_and_ 'Updated' entries yum now is "seeing double" although not for
Maybe this is a false track but a quick grep through .py from yum
shows that a string 'Erased' shows only in yum-cli/callback.py
file, even if in two different places, while 'Installed' and
'Updated' are there and also in yum-cli/output.py. Try
rpm -ql yum |grep '\.py$' |xargs grep -l "'Erased'"
and similar to see for yourself.
Ok, a suggestion from comment #5 is a false track. After slight string
modifications it is obvious that all log entries are printed from
yum-cli/callback.py. OTOH updating a bigger number of packages at
once I see that there is a time difference in "doubled" log entries.
It ranges from roughly 30 seconds to over 2 minutes. This suggests
that for every package a log entry is produced probably at
the installation start and the second time likely after a cleanup phase
(In reply to comment #6)
> Ok, a suggestion from comment #5 is a false track. After slight string
> modifications it is obvious that all log entries are printed from
> yum-cli/callback.py. OTOH updating a bigger number of packages at
Yeah. In fact, both install messages come from line 142. Removed messages come
from line 197.
> once I see that there is a time difference in "doubled" log entries.
> It ranges from roughly 30 seconds to over 2 minutes. This suggests
> that for every package a log entry is produced probably at
> the installation start and the second time likely after a cleanup phase
> was finished.
Looks like it's actually the test transaction that prints out the first message,
and the actual transaction that does the second. I seem to have neglected to let
test transactions not produce any output...
Created attachment 132182 [details]
Log to syslog and a file, and don't repeat entries.
This patch contains the code from previous patches, and turns on filtering
logging output on the RPM callback based on the output boolean flag passed in.
I applied a patch from comment #8 to my copy of yum and AFAICT it logs
and it does not "stutter" for 'Installed', 'Updated' or 'Erased'.
okay - I'll grab that patch and apply.
Seth applied this upstream and we should do a 2.9.3 "soon" which will have the fix.