Bug 698458 - RFE: report separators between reports in abrt.log
Summary: RFE: report separators between reports in abrt.log
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: abrt
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Denys Vlasenko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-20 22:00 UTC by Steve Tyler
Modified: 2012-08-06 20:03 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve Tyler 2011-04-20 22:00:02 UTC
Description of problem:
When using report_Logger to append reports to abrt.log, the reports are not separated by any marker. This makes it difficult to find the separate reports.

A workaround is to search for "executable".

Version-Release number of selected component (if applicable):
abrt-2.0.1-1.fc15.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Use report_Logger in Append mode to append two reports to abrt.log.
  
Actual results:
Example below.

Expected results:
The reports are separated by a marker, such as
"====="

Additional info:
Snippet from abrt.log, at the end of one report and the beginning of another.
...
   0x000000000041009c <+1980>:  mov    %edx,0x8(%rsp)
   0x00000000004100a0 <+1984>:  mov    $0x4136a0,%edx
   0x00000000004100a5 <+1989>:  jmpq   0x40fb9e <schema_key_construct_from_xml+702>
End of assembler dump.
executable: /bin/sleep
cmdline: sleep 1000
hostname: fir
component: coreutils
coredump: ./coredump
...

Comment 1 Steve Tyler 2011-04-20 22:02:24 UTC
I find report_Logger extremely useful for saving reports when automated submission to BZ is not working, but I really don't know if I would ever use Append mode.

Comment 2 Denys Vlasenko 2011-04-28 20:00:49 UTC
I am changing the format slightly, so that it becomes also parseable by machine.
The format is:

For single-line values:

NAME: <whitespace>VALUE

For multi-line values:

NAME:
:LINE1
:LINE2
:LINE3

Empty lines may be inserted for readability and should be ignored.

See the bug 700611 for the example how this output looks.

To cater for the needs on this bug, I propose to introduce a fictive

END:

element, which is to be emitted by Logger (in append mode only) as the last element. (Colon at the end doesn't carry any meaning, it just makes machine parsing a bit easier, by ensuring that any valid non-empty line has colon char somewhere).

Comment 3 Denys Vlasenko 2011-04-28 20:07:51 UTC
Fixed in git by commit 1912a7c3980713ccc81e9fd2895873e29dc519a2.

Comment 4 Steve Tyler 2011-04-28 20:27:13 UTC
(In reply to comment #2)
> I am changing the format slightly, so that it becomes also parseable by
> machine.
...

Awesome!

Comment 5 Steve Tyler 2011-04-28 20:35:20 UTC
(In reply to comment #3)
> Fixed in git by commit 1912a7c3980713ccc81e9fd2895873e29dc519a2.

Thanks, Denys.
https://fedorahosted.org/abrt/changeset/1912a7c3980713ccc81e9fd2895873e29dc519a2

Comment 6 Steve Tyler 2011-04-29 07:51:44 UTC
+    if (open_mode[0] == 'a')
+        fputs("\nEND:\n\n", stdout);

Writing a report in 'a' mode to an empty file results in a file with more lines than writing the same report in 'w' mode. Why not write "END:" in both cases, for the sake of consistency?

Comment 7 Steve Tyler 2011-04-29 11:49:08 UTC
Having "END:" in all cases would make it easier to count the number of reports in the file:
$ grep '^END:' abrt.log | wc -l

Comment 8 Fedora Update System 2011-05-06 10:53:31 UTC
abrt-2.0.2-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/abrt-2.0.2-1.fc15

Comment 9 Steve Tyler 2011-05-06 19:43:44 UTC
If the user first "stores" and then "appends", the resulting abrt.log file is missing the "END:" separator between the first report and the second report.

$ egrep 'executable:|END:' abrt-1.log
executable:     /bin/sleep
executable:     /bin/sleep
END:

abrt-2.0.2-2.fc15.x86_64

Comment 10 Fedora Update System 2011-05-07 15:06:59 UTC
Package abrt-2.0.2-1.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing abrt-2.0.2-1.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/abrt-2.0.2-1.fc15
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2011-05-08 04:04:26 UTC
abrt-2.0.2-3.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/abrt-2.0.2-3.fc15

Comment 12 Fedora End Of Life 2012-08-06 20:03:47 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 15. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 15 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 13 Fedora End Of Life 2012-08-06 20:03:48 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 15. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 15 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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