From b092efaca56dcd515451ec6c21a0c8b219403251 Mon Sep 17 00:00:00 2001 From: Peter Baughman Date: Fri, 22 Jun 2018 21:55:17 +0000 Subject: [PATCH] Fix for issue 1441 Use the logger.Handler's format method so that by default stack traces are included in the log message if exc_info is set on the LogRecord --- clients/rospy/src/rospy/impl/rosout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/rospy/src/rospy/impl/rosout.py b/clients/rospy/src/rospy/impl/rosout.py index 4514031809..a1ce4d84c6 100644 --- a/clients/rospy/src/rospy/impl/rosout.py +++ b/clients/rospy/src/rospy/impl/rosout.py @@ -121,7 +121,7 @@ def _rosout(level, msg, fname, line, func): class RosOutHandler(logging.Handler): def emit(self, record): - _rosout(_logging_to_rospy_levels[record.levelno], record.getMessage(), + _rosout(_logging_to_rospy_levels[record.levelno], self.format(record), record.filename, record.lineno, record.funcName) ## Load loggers for publishing to /rosout