mirror of https://github.com/zulip/zulip.git
logging_handlers: Avoid super long subject lines.
This commit is contained in:
parent
36bb2bf54a
commit
b5cf0067d5
|
@ -70,12 +70,14 @@ class AdminZulipHandler(logging.Handler):
|
||||||
try:
|
try:
|
||||||
if record.exc_info:
|
if record.exc_info:
|
||||||
stack_trace = ''.join(traceback.format_exception(*record.exc_info)) # type: Optional[str]
|
stack_trace = ''.join(traceback.format_exception(*record.exc_info)) # type: Optional[str]
|
||||||
|
message = str(record.exc_info[1])
|
||||||
else:
|
else:
|
||||||
stack_trace = None
|
stack_trace = None
|
||||||
|
message = record.getMessage()
|
||||||
|
|
||||||
report = dict(
|
report = dict(
|
||||||
node = platform.node(),
|
node = platform.node(),
|
||||||
message = record.getMessage(),
|
message = message,
|
||||||
stack_trace = stack_trace,
|
stack_trace = stack_trace,
|
||||||
)
|
)
|
||||||
if hasattr(record, "request"):
|
if hasattr(record, "request"):
|
||||||
|
|
Loading…
Reference in New Issue