logging_handlers: Avoid super long subject lines.

This commit is contained in:
Tim Abbott 2017-03-25 22:45:10 -07:00
parent 36bb2bf54a
commit b5cf0067d5
1 changed files with 3 additions and 1 deletions

View File

@ -70,12 +70,14 @@ class AdminZulipHandler(logging.Handler):
try:
if record.exc_info:
stack_trace = ''.join(traceback.format_exception(*record.exc_info)) # type: Optional[str]
message = str(record.exc_info[1])
else:
stack_trace = None
message = record.getMessage()
report = dict(
node = platform.node(),
message = record.getMessage(),
message = message,
stack_trace = stack_trace,
)
if hasattr(record, "request"):