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
[error ] test [test_logger]
Traceback (most recent call last):
File "inconsistent_exc_info.py", line 23, in <module>
raise ValueError("test")
ValueError: test
The problem is that the wrapped python logger has a default value of exc_info=True for .exception, which does not get overridden.
Not entirely sure whose responsibility it is (processor or bound logger) to handle this case.
OK for posterity I took another look and this problem is two-fold but only affects ConsoleRenderer:
we forward our event_dict to standard library logging at kwargs. Logger.exception has exc_info=True as kwarg.
that means that we'd have to force an exc_info=False into it, however, exc_info gets popped out of the event_dict by ConsoleRenderer. It figures out that it should do nothing, but hides the fact from Logger.exception.
I think the best way forward would be to make exception handling optional in ConsoleRenderer? And if it's deactivated, exc_info is passed unchanged.
Hi.
The new handling of the exception level has introduced a somewhat surprising behaviour.
To reproduce
I would expect the output to simply read:
Instead, it reads:
The problem is that the wrapped python logger has a default value of exc_info=True for .exception, which does not get overridden.
Not entirely sure whose responsibility it is (processor or bound logger) to handle this case.
It happens here:
The returned empty dictionary allows the exc_info to be set to True within the Python logger.
Note that in my reproduction example above, it also does not help if I force the
event_dict['exc_info'] = False
Happy to hear your thoughts.
The text was updated successfully, but these errors were encountered: