I take it back. In your example I probably would have used
logger.error("message", ex) and not used the catching method.
Ralph
> On Jan 7, 2014, at 5:18 AM, Ralph Goers <[email protected]> wrote:
>
> The way you are using it is the way it would be expected to be used. I would
> only use it to log an exception that is caught and not rethrown, but even
> then that usually happens because the exception can be handled and logging it
> is pretty much just noise - which is why it would be at level trace.
>
> Ralph
>
>> On Jan 6, 2014, at 3:40 PM, Matt Sicker <[email protected]> wrote:
>>
>> In my own projects, I was using it manually to log exactly what I thought
>> it was for. However, the method with no specified level uses Level.TRACE if
>> I recall correctly, and that level is usually disabled.
>>
>> Anyway, is this provided more so as a method to be automatically injected
>> via bytecode manipulation (along with logger.entry(), logger.exit(),
>> logger.throwing(), etc.)? Or done manually? If done manually, you can get
>> some rather amusingly messy methods. For example, from some code I've
>> written like that:
>>
>> <
>> https://raw.github.com/jvz/dynunit/master/src/main/java/atg/tools/dynunit/DynUnit.java
>>
>> Anyway, I'm asking now because I don't see log4j2 even using it internally
>> where appropriate. Is this more of a personal preference thing?
>>
>> --
>> Matt Sicker <[email protected]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]