Merge pull request #852 from sebres/patch-1

Bug fix in formatJournalEntry, gh-851
pull/858/head
Yaroslav Halchenko 10 years ago
commit b379f5d51b

@ -167,9 +167,10 @@ class FilterSystemd(JournalFilter): # pragma: systemd no cover
logelements.append(logentry['_HOSTNAME']) logelements.append(logentry['_HOSTNAME'])
if logentry.get('SYSLOG_IDENTIFIER'): if logentry.get('SYSLOG_IDENTIFIER'):
logelements.append(logentry['SYSLOG_IDENTIFIER']) logelements.append(logentry['SYSLOG_IDENTIFIER'])
if logentry.get('SYSLOG_PID') or logentry.get('_PID'): if logentry.get('SYSLOG_PID'):
logelements[-1] += ("[%i]" % logentry.get( logelements[-1] += ("[%i]" % logentry['SYSLOG_PID'])
'SYSLOG_PID', logentry['_PID'])) elif logentry.get('_PID'):
logelements[-1] += ("[%i]" % logentry['_PID'])
logelements[-1] += ":" logelements[-1] += ":"
elif logentry.get('_COMM'): elif logentry.get('_COMM'):
logelements.append(logentry['_COMM']) logelements.append(logentry['_COMM'])

Loading…
Cancel
Save