[jboss-dev] hibernate 3.3.0 upgrade, slf4j introduction into jbossas

Steve Ebersole steve at hibernate.org
Mon May 5 13:57:29 EDT 2008


It sounds like both do a similar thing.  The way slf4j works is that  
the classes in the base jar (slfj4-api) are compiled against some  
class (I forget the name) which is then not included in the base jar.   
Each of the binding jars define that binding class which the base jar  
classes were compiled against.  That provides the binding.

http://www.slf4j.org/faq.html#slf4j_compatible gives an overview of  
the process.

With slf4j you'd have similiar dependency requirements as what you  
mentioned for jboss-logging.  So for log4j, you'd simply include the  
following jars on the classpath: (1) slf4j-api.jar, (2) slf4j- 
log4j12.jar, (3) log4j.jar.  The only configuration here is to  
configure log4j loggers, appenders, etc.

I'm more than willing to take a look at what it might take to bridge  
slf4j and jboss-logging.

On May 5, 2008, at 12:37 PM, Ales Justin wrote:

>> In slf4j, binding to log4j as the logging backend, one simply  
>> includes an additional jar (slf4j-log4j) and your done;
>
> What is the content of this jar?
> We might do something similar slf4j --> jboss-logging --> jdk|log4j.
>
>> I have no clue how jboss-logging works, how it is configured, how  
>> it plays in environments other than JBoss AS.
>
> In AS you have conf/jboss-log4j.xml, which 'controls' all logging  
> inside AS env.
> In other envs it depends.
> e.g. standalone usage of jboss-logging + log4j --> put all 3 (jboss- 
> logging-spi, jboss-logging-log4j, log4j) artifacts on classpath +  
> log4j.properties and you're done. You code against jboss-logging- 
> spi, but that picks up jboss-logging-log4j at init, which inits  
> log4j, which is what gets used as the real impl.
>
> If you could look into slf4j-log4j, and see if we can write slf4j- 
> jbosslogging, that would be great.
> I can help you with any questions, or we can hack that together -  
> after I find some time off from Emmanuel's jsr303. :-)
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development


-----------------------------
Steve Ebersole

Project Lead
http://hibernate.org
steve at hibernate.org







More information about the jboss-development mailing list