summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Latchford <alex.latchford@gmail.com>2015-03-31 17:15:44 +1100
committerAlex Latchford <alex.latchford@gmail.com>2015-03-31 17:15:44 +1100
commit7fe3d55957e930f0a0f9d1aff4de4d77238fc639 (patch)
treee51f456444ce5fa9ea82dfeeecd02605102d47ec
parent74e520bf74012c41bb85a22182a95d3262f03aab (diff)
downloadcherrypy-7fe3d55957e930f0a0f9d1aff4de4d77238fc639.tar.gz
Include exc_info when calling logger
-rw-r--r--cherrypy/_cplogging.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cherrypy/_cplogging.py b/cherrypy/_cplogging.py
index 554fd7ef..9a2f5db7 100644
--- a/cherrypy/_cplogging.py
+++ b/cherrypy/_cplogging.py
@@ -209,9 +209,12 @@ class LogManager(object):
If ``traceback`` is True, the traceback of the current exception
(if any) will be appended to ``msg``.
"""
+ exc_info = None
if traceback:
msg += _cperror.format_exc()
- self.error_log.log(severity, ' '.join((self.time(), context, msg)))
+ exc_info = _cperror._exc_info()
+
+ self.error_log.log(severity, ' '.join((self.time(), context, msg)), exc_info=exc_info)
def __call__(self, *args, **kwargs):
"""An alias for ``error``."""