From 08857486e6f6b2caa5556ac20c9e1c8bd870f292 Mon Sep 17 00:00:00 2001 From: Wesley Bowman Date: Mon, 13 Mar 2017 08:51:38 +0100 Subject: Remove mid from JournalHandler Removed mid variable from JournalHandler since the MESSAGE_ID is already in the extras variable. MESSAGE_ID was being set to None, but this won't appear in the logs. --- systemd/journal.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/systemd/journal.py b/systemd/journal.py index e23e5a5..c98a85b 100644 --- a/systemd/journal.py +++ b/systemd/journal.py @@ -575,7 +575,6 @@ class JournalHandler(_logging.Handler): try: msg = self.format(record) pri = self.map_priority(record.levelno) - mid = getattr(record, 'MESSAGE_ID', None) extras = {k: str(v) for k, v in self._extra.items()} extras.update({ k: str(v) for k, v in record.__dict__.items() @@ -591,7 +590,6 @@ class JournalHandler(_logging.Handler): extras['CODE_ARGS'] = str(record.args) self.send(msg, - MESSAGE_ID=mid, PRIORITY=format(pri), LOGGER=record.name, THREAD_NAME=record.threadName, -- cgit v1.2.1