# Logback Frequently Asked Questions

# Logback Classic

How can I use logback-classic with Jetty ?

A few jars must be present in the JETTY_HOME/lib directory.

Logback-classic is based on the SLF4J api. Therefore, the slf4j-api-VERSION.jar jar must be present. This jar can be downloaded from the SLF4J project.

Logback's own jars must also be present, namely logback-core-VERSION.jar and logback-classic-VERSION.jar .

To configure logback-classic, a file called logback.xml should be placed at the root directory of Jetty, that is the JETTY_HOME directory. You can find configuration samples in the examples/src/chapter4/conf/ directory, in the distribution of logback.

How does the automatic configuration work?

If a file called logback.xml is found in the classpath, then it is used.

In case it is not found, a logback-test.xml file is searched, and used if available.

If none of these files are available, logback uses its `BasicConfiguratory` class to create a simple default configuration that will only log to the console.