Commit 6ab94292 authored by Andreas Jung's avatar Andreas Jung

Collector #1234: an exception triple passed to LOG() was not propagated properly to

the logging module of Python
parent f5668f66
......@@ -139,6 +139,9 @@ Zope Changes
Bugs fixed
- Collector #1234: an exception triple passed to LOG() was not
propagated properly to the logging module of Python
- Collector #1441: Removed headers introduced to make Microsoft
webfolders and office apps happy, since they make a lot of
standards-compliant things unhappy AND they trick MS Office
......
......@@ -42,6 +42,18 @@ def log_write(subsystem, severity, summary, detail, error):
msg = "%s\n%s" % (msg, detail)
logger = logging.getLogger(subsystem)
# Since the logging module of Python does not allow to pass a
# traceback triple, we need to fake the exception. (See also
# Collector #1234).
if isinstance(error, tuple):
try:
raise error[0], error[1], error[2]
except:
pass
logger.log(level, msg, exc_info=(error is not None))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment