[slf4j-user] ehcache switched from commons to j.u.l and I see no log files

Ceki Gulcu ceki at qos.ch
Mon Aug 24 12:40:14 CEST 2009


How are you installing jul-to-slf4j? See [1]. You just need to invoke 
SLF4JBridgeHandler.install(). Note that this approach is OK only if few messages 
pass through jul to SLF4J as the translation from jul to SLF4J is a costly 
operation.

[1] http://www.slf4j.org/api/org/slf4j/bridge/SLF4JBridgeHandler.html


John Cherouvim wrote:
> Hello
> 
> I have an application which uses ehcache 1.5 and I want to switch to 1.6.2
> Ehcache switched to J.U.L (from commons) and my application already has 
> slf4j-api-1.5.8.jar and slf4j-log4j12-5.8.jar (because of hibernate).
> 
> The documentation at http://ehcache.org/documentation/logging.html helps 
> me not.
> I tried adding jul-to-slf4j-1.5.8.jar but ehcache logs did not appear.
> 
> My log4j.properties file looks like:
>> log4j.logger.net.sf.ehcache=ALL, ehcache
>>
>> log4j.appender.ehcache=org.apache.log4j.RollingFileAppender
>> log4j.appender.ehcache.file=${catalina.home}/logs/ehcache.log
>> log4j.appender.ehcache.layout=org.apache.log4j.PatternLayout
>> log4j.appender.ehcache.layout.conversionPattern=%d{ISO8601} %-5p 
>> (%F:%L) - %m%n
> 
> Is there a way to fix this?
> 
> thanks
> John


-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch



More information about the slf4j-user mailing list