Red Hat Bugzilla – Bug 479387
[RFE] store timestamps in journal
Last modified: 2016-09-19 22:05:06 EDT
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.
<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?
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.
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...
> What about an option to the rlJournalPrintText, something like
+1 for this
I'm willing to prepare/review patch if Petr is not working on something already.
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.
*** Bug 563893 has been marked as a duplicate of this bug. ***
beakerlib-1.9-1.fc20 has been submitted as an update for Fedora 20.
* 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:
then log in and leave karma (feedback).
beakerlib-1.9-2.fc20 has been submitted as an update for Fedora 20.
Please consider the package fixing this bug available in Fedora stable repos once bz1116308 is closed and RHEL stable repos once bz1116317 is closed.
beakerlib-1.9-3.fc20 has been submitted as an update for Fedora 20.
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.