Validating if Exception is passed as last argument

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Validating if Exception is passed as last argument

Debraj Manna
Cross-posting from stackoverflow
<https://stackoverflow.com/questions/47633702/log4j-validating-if-exception-is-passed-as-last-argument>

As mentioned in SLF4J FAQ <https://www.slf4j.org/faq.html#paramException>

The SLF4J API supports parametrization in the presence of an exception,
> assuming the exception is the last parameter.


In a project is there a way to identify if exception is passed as a last
argument to all logger's method call (like error(), info())?