Handle exceptions in the warning method as we do in error, passing it as is without stringifying it because it will get stringified in a different way within the create_warning_captured_event method.
Testing done
Reproduced customer's exact issue and more in a unit test
Description
Logger.error
&Logger.warning
in terms of the interpretation of the arguments. The crucial part that was not working is stringifying the first argument and using it as a formatter: https://github.com/python/cpython/blob/main/Lib/logging/__init__.py#L387warning
method as we do inerror
, passing it as is without stringifying it because it will get stringified in a different way within thecreate_warning_captured_event
method.Testing done
Reproduced customer's exact issue and more in a unit test