summaryrefslogtreecommitdiff
path: root/systemd/journal.py
diff options
context:
space:
mode:
Diffstat (limited to 'systemd/journal.py')
-rw-r--r--systemd/journal.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/systemd/journal.py b/systemd/journal.py
index c98a85b..cb37150 100644
--- a/systemd/journal.py
+++ b/systemd/journal.py
@@ -575,11 +575,10 @@ class JournalHandler(_logging.Handler):
try:
msg = self.format(record)
pri = self.map_priority(record.levelno)
- extras = {k: str(v) for k, v in self._extra.items()}
- extras.update({
- k: str(v) for k, v in record.__dict__.items()
- })
+ # defaults
+ extras = self._extra.copy()
+ # higher priority
if record.exc_text:
extras['EXCEPTION_TEXT'] = record.exc_text
@@ -589,6 +588,9 @@ class JournalHandler(_logging.Handler):
if record.args:
extras['CODE_ARGS'] = str(record.args)
+ # explicit arguments — highest priority
+ extras.update(record.__dict__)
+
self.send(msg,
PRIORITY=format(pri),
LOGGER=record.name,