aboutsummaryrefslogtreecommitdiff
path: root/rpki/log.py
diff options
context:
space:
mode:
Diffstat (limited to 'rpki/log.py')
-rw-r--r--rpki/log.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/rpki/log.py b/rpki/log.py
index 2abb3b2c..4fe2a808 100644
--- a/rpki/log.py
+++ b/rpki/log.py
@@ -96,7 +96,10 @@ class Formatter(object):
yield time.strftime("%Y-%m-%d %H:%M:%S ", time.gmtime(record.created))
yield "%s[%d]: " % (self.ident, record.process)
try:
- yield repr(record.context) + " "
+ if isinstance(record.context, (str, unicode)):
+ yield record.context + " "
+ else:
+ yield repr(record.context) + " "
except AttributeError:
pass
yield record.getMessage()