[slf4j-user] jdk14 over slf4j

Christian Stein sormuras at gmx.net
Fri Nov 16 12:31:26 CET 2007


Rafal Krupinski schrieb:
> Rafal Krupinski wrote:
>> Hello!
>> Anyone knows anything about jdk14-over-slf4j?
>> I found some references on mailing list archives, bun no downloads or 
>> cvs repository for this project.
>>
>> Does this project even exist? Is it abandoned?
>> Anyone?
> 
> Sorry, I just found old thread 'java.util.logging.LogManager 
> Implementation?'

Hi Rafal,

maybe, this issue 38 http://bugzilla.slf4j.org/show_bug.cgi?id=38 can help.
I attached a simple SLF4JHandler http://bugzilla.slf4j.org/attachment.cgi?id=15
that still does the job for me in standalone Java projects. Haven't tested
it in a managed environment (Servlets,...), though.

Cheers,
Christian

PS: There's a minor flaw in the SLF4JHandler. It doesn't pass the optional
exception object. See below, with an easy fix. :)
[...]
     /*
      * WARN
      */
     if (record.getLevel() == Level.WARNING) {
       publisher.warn(message); (***)
       return;
     }
[...]

       publisher.warn(message, thrown).



More information about the slf4j-user mailing list