incubator-yoko-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Kühne <lakue...@t-online.de>
Subject Re: coding standard and logging
Date Thu, 06 Apr 2006 21:48:16 GMT
If everyone thinks dependency injection is cool, why isn't it cool for 
logging?

The avalon interface basically forces you to not use the 
Logger.getLogger(My.class) idiom, unlike slf4j. That limitation is a 
feature. It means that the log messages of two instances of the same 
class _and_their_submodules_ can be identified in the log file.

It can be pretty neat when you see an error message and you can identify 
that it was generated from the 
"geronimoStandardORB.connectionHandlerThreadPool" logger. With slf4j 
your only info would typically be "o.a.yoko.orb.ThreadPool" that might 
as well belong to a second ORB that has been instantiated by user code.

It's admittedly a bit more work to pass all those logger instances 
around than simply calling LoggerFactory.getLogger().

Regards,
Lars


Alan D. Cabrera wrote:

> What's wrong w/ slf4j?
>
>
> Regards,
> Alan
>
> Lars Kühne wrote, On 4/6/2006 1:58 PM:
>
>> Another one that I found easy to work with is
>>
>> http://excalibur.apache.org/apidocs/org/apache/avalon/framework/logger/Logger.html

>>
>>
>> A few things are missing, like trace(), but it actually is an 
>> interface, not a class as in mx4j.
>>
>> Dain Sundstrom wrote:
>>
>>> I'm not saying this is the exact interface we want to use, but a 
>>> good  example of a log interface I found easy to integrate into 
>>> Geronimo.
>>>
>>> http://mx4j.sourceforge.net/docs/api/mx4j/log/Log.html
>>>
>>> -dain
>>>
>>> On Apr 6, 2006, at 12:31 PM, Sakala, Adinarayana wrote:
>>>
>>>> Dain, can you give a pointer to some doco on own logging interface  
>>>> that mx4j project did?
>>>>
>>>> thanks,
>>>> adi
>>>
>>>
>>>
>>
>
>


Mime
View raw message