Thats already supported in slf4j by passing the exception as last argument [1].
[1] http://slf4j.org/faq.html#paramException Chetan Mehrotra On Thu, Mar 19, 2015 at 1:51 PM, Adax Adarsh <[email protected]> wrote: > Hi All, > It would be good to have an API which take message format, arguments and > throwable parameters at all levels of logging. > > As of now, how we are doing it is to use below mentioned way of > logging(kind of hack). > > logger.error( messageFormat, arguments ); > logger.error( messageFormat, throwable ); > > Which is kind of ugly but still works as a hack. The disadvantage of this > kind of logging is that, it send 2 log events instead of 1 event. > > > let me know your view on this folks. > > Thanks, > Adarsh > > _______________________________________________ > slf4j-dev mailing list > [email protected] > http://mailman.qos.ch/mailman/listinfo/slf4j-dev >
_______________________________________________ slf4j-dev mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/slf4j-dev
