[slf4j-user] Using slf4j in a library project

Sonu Gopal Sachdeva sonugopal at gmail.com
Wed Jan 31 14:59:47 CET 2007


Hi,

You always have to the slf4j-api along with an slf4j-<implementation
specific> library for e.g. slf4j-log4j. 

The LoggerFactory class is present in slf4j-<implementation specific>
library, infact this is how Slf4j removes all the commons-logging
classloading issues.

Regards,
Sonu.


-----Original Message-----
From: user-bounces at slf4j.org [mailto:user-bounces at slf4j.org] On Behalf Of
reg4000 at googlemail.com
Sent: Wednesday, January 31, 2007 2:54 PM
To: user at slf4j.org
Subject: [slf4j-user] Using slf4j in a library project

Hello,

I have a question about the usage of slf4j in a library project. I wonder
how the library can depend on slf4j-api only.
As the slf4j-documentation suggest the standard usage pattern is

 1: import org.slf4j.Logger;
 2: import org.slf4j.LoggerFactory;
 3:
 4: public class Wombat {
 5:
 6:   final Logger logger = LoggerFactory.getLogger(Wombat.class);

The problem is that already this does not only depend on slf4j-api but on
some real implementation because of the missing of LoggerFactory in
slf4j-api.jar.

Regards
ThoMo
_______________________________________________
user mailing list
user at slf4j.org
http://www.slf4j.org/mailman/listinfo/user




More information about the slf4j-user mailing list