Bug 479387 - [RFE] store timestamps in journal
[RFE] store timestamps in journal
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: beakerlib (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Petr Muller
Fedora Extras Quality Assurance
:
: 563893 (view as bug list)
Depends On: bl-journal-overhaul
Blocks: Fedora-beakerlib-1.9-3 1116317
  Show dependency treegraph
 
Reported: 2009-01-09 04:13 EST by Ales Zelinka
Modified: 2016-09-19 22:05 EDT (History)
5 users (show)

See Also:
Fixed In Version: beakerlib-1.9-3.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-30 02:58:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ales Zelinka 2009-01-09 04:13:23 EST
When an assertions is run, two records are generated
 - stdout + logfile/outputfile
 - journal record

The stdout one has a timestamp added

 :: [10:37:57] :: [ INFO    ] :: Running command: echo abc

Journal one has not, so when log in rlJournalPrint-ed is generated, timestamps are missing:

:: [   FAIL   ] :: Running 'echo abc' (Expected 2-7-3-5, got 0)

I think that every log should contain timestamps and because I want journal to become The main source of information on test run, I suggest including timestamps in xml journal too.

Something like 

<test message="Running 'echo abc' (Expected 2-7-3-5, got 0)" timestamp="2001-07-04 12:08:56 CET">FAIL</test>

ACKs? NACKs? Comments?
Comment 1 Petr Šplíchal 2009-01-09 04:32:26 EST
It's true that timestamps can be useful (especially when debugging multihost tests). I think the best solution could be to include timestamps both in journal and stdout but omitting them in rlJournalPrintText output.

In this way we will keep the final report brief for quick glance and if we need some more details we can have a look into TESTOUT.log or the journal file.
Comment 2 Petr Muller 2009-01-12 10:20:32 EST
What about an option to the rlJournalPrintText, something like --with-timestamps? You don't need this in all tests, but you know this could be useful when you write one, so you could use this option to provide this sort of information to users of your test...
Comment 3 Petr Šplíchal 2009-01-12 12:26:35 EST
> What about an option to the rlJournalPrintText, something like
> --with-timestamps?

Even better!
+1 for this
Comment 4 Jan Hutař 2010-07-28 06:19:23 EDT
+1

I'm willing to prepare/review patch if Petr is not working on something already.
Comment 6 Petr Muller 2013-07-16 14:35:48 EDT
Implemented in new journal. 

Driven by the environment variables: based on them, timestamps are either collected or not into the journal XML. When the underlying XML does have the timestamps collected, textual output can be created from it with or without the timestamps. The mechanism is intended to be consistent with other collecting/output use cases and wrapped with tools, so we wont bother users with such granularity.

https://github.com/petr-muller/beakerlib/commit/8fbfa67d59ff25ceb2fb27c1ef556f3a87384eef
https://github.com/petr-muller/beakerlib/commit/c5ab92976ed240145b7d4cd27234881c8ff51ff3
https://github.com/petr-muller/beakerlib/commit/d78cd1b76d7596153d0fbd0a8c98786fc8ece973
https://github.com/petr-muller/beakerlib/commit/256f725fd899ab1fc0a5eb200204b7cae8056192
https://github.com/petr-muller/beakerlib/commit/08823214c2a3490594fb782a585d68aab1e6327e
Comment 7 Petr Muller 2013-07-16 14:56:03 EDT
*** Bug 563893 has been marked as a duplicate of this bug. ***
Comment 8 Fedora Update System 2014-06-17 09:43:03 EDT
beakerlib-1.9-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/beakerlib-1.9-1.fc20
Comment 9 Fedora Update System 2014-06-17 19:30:30 EDT
Package beakerlib-1.9-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing beakerlib-1.9-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7442/beakerlib-1.9-1.fc20
then log in and leave karma (feedback).
Comment 10 Fedora Update System 2014-07-02 04:02:45 EDT
beakerlib-1.9-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/beakerlib-1.9-2.fc20
Comment 11 Dalibor Pospíšil 2014-07-04 04:50:54 EDT
Please consider the package fixing this bug available in Fedora stable repos once bz1116308 is closed and RHEL stable repos once bz1116317 is closed.

Fixed in:
beakerlib-1.9-2.fc19
beakerlib-1.9-2.fc20
beakerlib-1.9-2.fc21
beakerlib-1.9-3.el5
beakerlib-1.9-2.el6
beakerlib-1.9-2.el7
Comment 12 Fedora Update System 2014-07-17 09:16:29 EDT
beakerlib-1.9-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/beakerlib-1.9-3.fc20
Comment 13 Fedora Update System 2014-07-30 02:58:08 EDT
beakerlib-1.9-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

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