ENH: For syslog use SYSLOG_PID over _PID in systemd journal log format

pull/697/head
Steven Hiscocks 11 years ago
parent c2289bc8fe
commit 9d6fc6eca2

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

Loading…
Cancel
Save