Bug 1276751 - journalctl skips log entries with no MESSAGE when using its terser output formats
journalctl skips log entries with no MESSAGE when using its terser output for...
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: systemd-maint
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-30 13:52 EDT by mulhern
Modified: 2017-08-21 04:44 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
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 mulhern 2015-10-30 13:52:19 EDT
Description of problem:

journalctl should show all entries that match its search criteria. But it skips those that have no MESSAGE field set.


Version-Release number of selected component (if applicable):

219

How reproducible:

Always.

Steps to Reproduce:
1. Get a message with no MESSAGE field into the log. This is very easy using python-systemd as:

>>> from systemd import journal
>>> journal.sendv('MESSAGE_ID=94a9ab0126ed438ebbc99b9771841f22')

2. Inspect the journal by searching for messages with this MESSAGE_ID and note that there are no lines of output representing entries found.

[root@megadeth mulherns_data]# journalctl UUID=94a9ab0126ed438ebbc99b9771841f22
-- Logs begin at Mon 2015-09-14 12:02:58 EDT, end at Fri 2015-10-30 13:27:14 EDT. --

Actual results:

No lines corresponding to the entry just inserted into the journal is found if journalctl's default output format is used.

Expected results:

Should see an entry, which probably should look the same as the entry you get when the MESSAGE field is set to "", like:

>>> from systemd import journal
>>> journal.sendv('MESSAGE_ID=94a9ab0126ed438ebbc99b9771841f22', MESSAGE=")

[root@megadeth mulherns_data]# journalctl MESSAGE_ID=94a9ab0126ed438ebbc99b9771841f22
-- Logs begin at Mon 2015-09-14 12:02:58 EDT, end at Fri 2015-10-30 13:27:57 EDT. --
Oct 30 13:27:57 megadeth.lab.bos.redhat.com python[35063]: 

Note that an entry is shown, but there is nothing in the MESSAGE field, which is fine.

Additional info:

With wordy output formats, e.g., verbose, json the entry is shown regardless of whether message is set or not, the terse output formats all seem to behave like the default in not showing the entry w/ unset message.

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