Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Turning down Slf4jLog Level?

A few questions there...

If your project pulls in slf4j, then its also pulling in dependencies flagged as optional.

We do not have a requirement for slf4j, that is just an optional logging mechanism.
When you have slf4j enabled however, you have to abide by the slf4j behaviors.

With slf4j you have a very powerful log routing mechanism available to you.

If you want to continue with using slf4j, then you essentially have 2 decisions to make.

First is what logging frameworks do you want slf4j to consume?
Slf4j is able to route events from your application and 3rd party libs being generated for java.util.logging, commons-logging, log4j, and slf4j-api to itself.
Think of this as Incoming Logging Events.

Second is what logging framework do you want slf4j to route to?
Slf4j is capable of sending the logging events to a real logging framework for eventual display / writing to disk / etc ...
It has support for android-logging, commons-logging, log4j, java.util.logging, logback, and even slf4j-simple.
Think of this as Outgoing Logging Events.

Once you have picked both side, you can then customize your classpath to what you want it to handle.
And then you can use the Outgoing Logging framework documentation to know how to filter the logging events.

Joakim Erdfelt <joakim@xxxxxxxxxxx>
Developer advice, services and support
from the Jetty & CometD experts

On Tue, Nov 13, 2012 at 1:01 PM, Marty Sullivan <dark3251@xxxxxxxxx> wrote:
Hello, I added another dependency to my project that uses Jetty and, in turn, the slf4j.jar was also added to my project. Since then, Jetty is filling up my console as it seems to be set to DEBUG. How do I change the level to INFO or WARN for this logger? org.eclipse.jetty.util.log.Slf4jLog is the culprit.
jetty-users mailing list

Back to the top