ppkarwasz commented on issue #3433:
URL: 
https://github.com/apache/logging-log4j2/issues/3433#issuecomment-2723930666

   Some thoughts:
   
   - This is a recurring question. I can't find the reference now, but multiple 
times users asked for `log(Object)` to treat exceptions in a different way.
   - There is a 
[`Logger.catching`](https://logging.apache.org/log4j/2.x/javadoc/log4j-api/org/apache/logging/log4j/Logger.html#catching(java.lang.Throwable)
 method that does exactly what @Niko-O asks.
   
   Given Ralph's remarks, we should probably have an Error Prone rule that 
issues a warning if a `Throwable` is passed as a logging message and suggests 
using `catching` instead.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to