Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 61888 - misleading log times in up2date's log
misleading log times in up2date's log
Product: Red Hat Linux
Classification: Retired
Component: up2date (Show other bugs)
i386 Linux
low Severity low
: ---
: ---
Assigned To: Adrian Likins
Jay Turner
Depends On:
  Show dependency treegraph
Reported: 2002-03-25 12:53 EST by James Manning
Modified: 2015-01-07 18:55 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-03-25 18:14:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch so time in log is time of action (686 bytes, patch)
2002-03-25 12:54 EST, James Manning
no flags Details | Diff

  None (edit)
Description James Manning 2002-03-25 12:53:03 EST
Basically, the log_info that contains the time for log entries is set when the Log
class instance log is first created - this results in logfile entries that always
have the same time setting, no matter when the action actually happened.

As I'm writing this bugzilla entry, for example, the 2 lines that rhn_check's
call to up2date just wrote to my /var/spool/up2date say it's 20 minutes ago:

[Mon Mar 25 12:18:37 2002] up2date deleting /var/spool/up2date/cyrus-sasl-1.5.24-22.7.i386.hdr
[Mon Mar 25 12:18:37 2002] up2date deleting /var/spool/up2date/cyrus-sasl-1.5.24-22.7.i386.rpm
[root@porivoapp02 log]# date
Mon Mar 25 12:38:15 EST 2002

if "time up2date got started" needs to be preserved, we can just have a line get spit
to the log when up2date gets started.  Since it's when we assign the time now, doing
that log line in Log's __init__ seems appropriate.

I'll attach a patch that does this

So... basically

[Mon Mar 25 12:19:07 2002] up2date Opening rpmdb in /var/lib/rpm/ with option 0
[Mon Mar 25 12:19:07 2002] up2date updating login info

[up2date] [Mon Mar 25 12:47:20 2002] Opening rpmdb in /var/lib/rpm/ with option 0
[up2date] [Mon Mar 25 12:47:21 2002] updating login info

(the time reflects the actual time that it happened instead of when up2date started)
Comment 1 James Manning 2002-03-25 12:54:02 EST
Created attachment 50204 [details]
patch so time in log is time of action
Comment 2 Adrian Likins 2002-03-25 15:47:26 EST
applied, testing now
Comment 3 Adrian Likins 2002-03-25 16:14:35 EST
ended up appling a slightly different version of this, mainly
to keep the log file format the same
Comment 4 James Manning 2002-03-25 16:20:30 EST
sweet!  I didn't like the output mine was producing, but I didn't wanna change the
actual code too much in semantics (fixed string at start).  coolio
Comment 5 Adrian Likins 2002-03-25 18:14:27 EST
should be fixed in version 2.7.62 or higher

Note You need to log in before you can comment on or make changes to this bug.