diff options
Diffstat (limited to 'rpki/log.py')
-rw-r--r-- | rpki/log.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rpki/log.py b/rpki/log.py index 2abb3b2c..0794a68f 100644 --- a/rpki/log.py +++ b/rpki/log.py @@ -48,7 +48,7 @@ show_python_ids = False # Whether tracebacks are enabled globally. Individual classes and # modules may choose to override this. -enable_tracebacks = False +enable_tracebacks = True ## @var use_setproctitle # Whether to use setproctitle (if available) to change name shown for @@ -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() |