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

John Cherouvim jc at eworx.gr
Mon Aug 24 12:45:37 CEST 2009


Hello Ceki

The code that changed is my dependency's (ehcache) and not my 
application code.
I just droped the jar into WEB-INF/lib
Is it possible to make logging work again without having to touch any 
code but only via configuration file changes?

thanks for your quick response
John


Ceki Gulcu wrote:
>
> 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
>
>

-- 
Ioannis Cherouvim
Software Engineer
mail: jc at eworx.gr
web: www.eworx.gr




More information about the slf4j-user mailing list