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
Feature request
I am requesting a feature where the logger interface is extended to have an error method that accepts varargs along with a Throwable.
Motivation
Currently, the error method accepts either a message with varargs or a message with a Throwable. There isn't a method that accepts both combined. This leads to a situation where developers are forced to combine messages and/or params with error objects manually, which can lead to loss of stack trace information or awkward workarounds.
Suggested Solution
Add the following method to the Logger interface:
Usage Example
This allows the user to log an error with formatting options as well as attaching an exception stack trace like so:
logger.error(throwable, "Something went wrong with the value: {} {}", value1, value2);
I believe this enhancement will make the API more flexible and user-friendly when dealing with common logging scenarios that involve both parameters and exceptions.
The text was updated successfully, but these errors were encountered:
Feature request
I am requesting a feature where the logger interface is extended to have an
error
method that accepts varargs along with aThrowable
.Motivation
Currently, the
error
method accepts either a message with varargs or a message with aThrowable
. There isn't a method that accepts both combined. This leads to a situation where developers are forced to combine messages and/or params with error objects manually, which can lead to loss of stack trace information or awkward workarounds.Suggested Solution
Add the following method to the
Logger
interface:Usage Example
This allows the user to log an error with formatting options as well as attaching an exception stack trace like so:
I believe this enhancement will make the API more flexible and user-friendly when dealing with common logging scenarios that involve both parameters and exceptions.
The text was updated successfully, but these errors were encountered: