You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Include exception traceback to messages logged using logging.exception #3828
If I am executing the My Keyword in my testcase then the exception printed by logger.exception will only print out the immediate exception message Catching error but nothing about the traceback of this exception.
The behaviour is different compared to the standard python logger that would log the exc_info and provides information about the traceback.
The use of logger.exception as in this example is the suggested way - afaik - in python to log exceptions. You would not add the original exception message to the message argument to logger.exception because - normally - this would lead to a duplication of error messages.
The robot logger however swallows this exception hierachy.
The expected behaviour is to contain the exc_info structure in the log output.
changed the title [-]The Robot Logger for Python does not log the Exception trace[/-][+]Include exception traceback to messages logged using `logging.exception`[/+]on Mar 3, 2021
Activity
CarstenLeue commentedon Jan 18, 2021
See also
exc_infoon https://docs.python.org/3/library/logging.html#logrecord-attributespekkaklarck commentedon Mar 3, 2021
I can reproduce this. Adding the traceback into the message would be pretty easy. That changes the error to something like this:
[-]The Robot Logger for Python does not log the Exception trace[/-][+]Include exception traceback to messages logged using `logging.exception`[/+]