Feature enhancement (Logger): automatically intercept Runtime exceptions, and log information #1527
Labels
good first issue
Good for newcomers
priority:3
Neutral - not a core feature or affects less than 40% of users
status/staged-major-release
This change will go with the next major release
v2
Version 2
Milestone
Is your feature request related to a problem? Please describe.
When using the Powertools Logger, log lines are annotated with a number of useful fields such as
function_request_id
.However, if a Runtime exception is thrown, Powertools Logger isn't used to log the exception. Instead the exception is printed using the
System.err
by the JVM, and the log lines do not contain any information relating to the function execution.Describe the solution you'd like
I would like the RuntimeExceptions to be printed, so when exceptions are raised in my code, I can identify the
function_request_id
for further debuggingDescribe alternatives you've considered
It is possible for Powertools users to define their own catching mechanism, however it would be nice if Powertools Logger printed this information by default
Additional context
The text was updated successfully, but these errors were encountered: