| Author |
How to pass exception as one of the object[] when doing logging?
|
raminaa niilian
Ranch Hand
Joined: Jul 14, 2005
Posts: 550
|
|
Hi,
I am trying to understand is it possible to have functionality of both these methods in one place? for example have a formatted message with the parameters and also have the exception being logged along with the message?
Thank you.
|
 |
Jeff Verdegan
Bartender
Joined: Jan 03, 2004
Posts: 5893
|
|
raminaa niilian wrote:Hi,
I am trying to understand is it possible to have functionality of both these methods in one place? for example have a formatted message with the parameters and also have the exception being logged along with the message?
Thank you.
If those are all the methods and you can't add any, then it's not possible. Otherwise, if you control that class, you can add a signature that takes level, msg, params, thrown.
Of course, in lieu of calling
you can just call String.format() to format your message and then call
|
 |
 |
|
|
subject: How to pass exception as one of the object[] when doing logging?
|
|
|