From 03091f1bf04c64b888a75256f2da988dec9a1108 Mon Sep 17 00:00:00 2001 From: Ian Good Date: Sat, 22 Feb 2020 20:03:20 +0000 Subject: [PATCH] Fix short log lines due to bytestrings --- setup.py | 2 +- slimta/logging/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ce7115f8..74f17e4f 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ setup(name='python-slimta', - version='4.0.10', + version='4.0.11', author='Ian Good', author_email='icgood@gmail.com', description='Lightweight, asynchronous SMTP libraries.', diff --git a/slimta/logging/__init__.py b/slimta/logging/__init__.py index 4ca4b69a..67780ce8 100644 --- a/slimta/logging/__init__.py +++ b/slimta/logging/__init__.py @@ -116,7 +116,7 @@ def log_exception(name, **kwargs): data = kwargs.copy() data['message'] = str(value) data['args'] = value.args - tb_str = traceback.format_exception(type, value, tb) + tb_str = ''.join(traceback.format_exception(type, value, tb)) data_str = ' '.join(['='.join((key, log_repr.repr(val))) for key, val in sorted(data.items())]) logger.error('exception:{0}:unhandled {1} traceback={2}'.format( @@ -125,6 +125,7 @@ def log_exception(name, **kwargs): log_repr = reprlib.Repr() log_repr.maxstring = 100 +log_repr.maxother = 100 def logline(log, type, typeid, operation, **data):