Open
Description
There are at least hundreds of places in our codebase where the code reads like
try
{
...
}
catch ( Exception e )
{
AppLogService.error( e )
}
This swallows the exception stacktrace.
SLF4J decided against accepting object as an input to a log method because of this : https://www.slf4j.org/faq.html#string_or_object
(although log4j2 still has this API..)
What about adding a new override to AppLogService like this ?
public static void error( Throwable t )
{
_loggerErrors.error( t, t );
}
If people really want to log only the exception name, then they can do AppLogService.error ( e.toString() );
Metadata
Metadata
Assignees
Labels
No labels