[slf4j-dev] [Bug 79] NullPointerException in SLF4JLocationAwareLog.debug

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Wed May 28 07:38:23 CEST 2008


http://bugzilla.slf4j.org/show_bug.cgi?id=79





------- Comment #7 from cameron at braid.com.au  2008-05-28 07:38 -------
(In reply to comment #6)
> (In reply to comment #5)
> > Cameron,
> > 
> > Have you noticed that you somehow the JettyLog class from  the
> > com.sun.org.apache.commons.logging package is being used. What is with that?
> > 
> > Can you describe your environment a little more?
> > 
> 
> 
> I include the jetty, jetty-plus jetty-util jars in my classpath since I use
> jetty embedded in my app.
> 
> I can also run my app from a java main class that embeds a jetty server, which
> when it starts it prints out this :
> 
> 05:24:53 INFO  [log] Logging to
> org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
> 
> So, it looks like jetty must be doing something to configure slf4j ?
> 
> However, I don't get the same InvocationTargetException when the embedded jetty
> server is shutting down.
> 

com.sun.org.apache.commons.logging.LogFactory comes from the jetty jsp jar,
which bridges com.sun.org.apache.commons.logging.LogFactory the jetty logging

org.mortbay.log.Log says this :

/** Logging.
 * This class provides a static logging interface.  If an instance of the 
 * org.slf4j.Logger class is found on the classpath, the static log methods
 * are directed to a slf4j logger for "org.mortbay.log".   Otherwise the logs
 * are directed to stderr.
*/

It the uses reflection to load and instantiate org.mortbay.log.Slf4jLog

And as a side note - believe it or not, org.mortbay.log.Slf4jLog uses
reflection to invoke the log methods on the slf4j instance


-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the slf4j-dev mailing list