[Yanel-dev] log4j Category

Oli Kessler ok at ncode.ch
Fri Nov 2 16:33:45 CET 2007


On 02.11.2007, at 15:53, Michael Wechner wrote:

> Oli Kessler wrote:
>
>> Hi all,
>>
>> The website http://logging.apache.org/log4j/1.2/apidocs/ 
>> index.html  says in the documentation for Category:
>>
>> ***
>> This class has been deprecated and replaced by the Logger  
>> subclass.  It will be kept around to preserve backward  
>> compatibility until mid  2003.
>> ..
>>
>> // Deprecated form:
>> Category cat = Category.getInstance("foo.bar")
>>
>> // Preferred form for retrieving loggers:
>> Logger logger = Logger.getLogger("foo.bar")
>> ***
>>
>> What do you think?
>
>
> is this refering to the generic Logger API of Java
>
> http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Logger.html

There is no Category object in the generic Logging API as far as I  
see on the docs.

Yanel uses the log4j API directly currently.

One might think about using the http://commons.apache.org/logging/  
commons logging package that would allow for replacing the log  
implementation (log4j, avalon LogKit,  the default 1.4 logging API of  
the JRE, ..)

Otherwise I would suggest to use the class "Logger" in the future.

Cheers,
-ok

>
> ?
>
> Which would use log4j as an implementation?
>
> If so, then I think we should do this.
>
> WDOT?
>
> Cheers
>
> Michi
>




More information about the Yanel-development mailing list