[logback-user] maven jetty logback

Kevin S. Clarke ksclarke at gmail.com
Wed Jun 20 21:19:56 CEST 2007


Thanks for the reply.  I've since realized that it is finding it in
maven's src/main/resources but that the jetty logger doesn't seem to
be changed by it.

My logback config looks like:

<configuration debug="true">
    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
        <layout class="ch.qos.logback.classic.PatternLayout">
            <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
    <appender name="File" class="ch.qos.logback.core.FileAppender">
        <param name="file" value="diglib.log"/>
        <layout class="ch.qos.logback.classic.PatternLayout">
            <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
    <logger name="org.mortbay">
        <level value="warn"/>
        <level value="warn"/>
        <appender-ref ref="File"/>
        <appender-ref ref="Console"/>

If I get a logger for one of my classes and output something to it,
the logback.xml is respected (nothing below "warn" comes out) in the

For some reason though the jetty logger is outputting everything at
the debug level despite having its logger set to warn in the config.

15:12:13.650 [main] INFO  org.mortbay.log - Logging to
Logger[org.mortbay.log] via org.mortbay.log.Slf4jLog
15:12:13.652 [main] DEBUG org.mortbay.log - Container Server at 87e704 +
SelectChannelConnector at as connector
15:12:13.677 [main] DEBUG org.mortbay.log - Container Server at 87e704 +
HandlerCollection at 15c97e4 as handler

If I take the logback jars out of the maven-jetty's classpath then
jetty uses the sterr and isn't in debug mode.  I'm not sure why jetty
in maven with logback seems to be stuck in debug for its output.

Any ideas?


On 6/20/07, Ceki Gulcu <listid at qos.ch> wrote:
> Hi Kevin,
> Do you wish to use logback-classic or logback-access with the maven-jetty plug-in?
> For logback-classic, place logback.xml in src/main/resources or src/test/resources.
> Did you know that logback-classic checks for logback-test.xml first and for
> logback.xml second?
> HTH,
> Kevin S. Clarke wrote:
> > Hi,
> >
> > I want to use logback with the maven-jetty plugin but I don't seem to
> > be able to find the right place to put the logback.xml file.  I've
> > read the jetty app by itself looks in the $JETTY_HOME/resources folder
> > but $project/src/resources doesn't seem to work for the plugin.
> >
> > Any ideas?
> >
> > Thanks,
> > Kevin
> --
> Ceki Gülcü
> Logback: The reliable, generic, fast and flexible logging framework for Java.
> http://logback.qos.ch
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user

More information about the Logback-user mailing list