[logback-user] Configuring logback under Tomcat6

robin bakkerus robin.bakkerus at gmail.com
Tue Dec 9 15:09:51 CET 2008


Hello Ceki,

I followed your guidelines, and it works!
But I found out that my question was misleading. Your solution works if you
start Tomcat the normal way (startup.bat)
But this solution does not seem to work when I start or debug, Tomcat from
Eclipse-JEE (Ganymede).

I tried to update the server.xml in the \workspace\.metadata\..\tmp0\conf
directory, but then I get ClassNotFound exceptions !?

Is there another way?

gr Robin


On Tue, Dec 9, 2008 at 11:41 AM, Ceki Gulcu <ceki at qos.ch> wrote:

>
> Hello Robin,
>
> Place logback-access-0.9.13.jar and logback-core-0.9.13.jar under
> $TOMCAT6_HOME/lib/ folder. Place logback-access.xml configuration file
> under
> $TOMCAT6_HOME/conf. A simple config file you can use is:
>
> <configuration>
>   <appender name="STDOUT"
>     class="ch.qos.logback.core.ConsoleAppender">
>     <layout
>       class="ch.qos.logback.access.PatternLayout">
>       <Pattern>%h %l %u %user %date "%r" %s %b</Pattern>
>     </layout>
>   </appender>
>
>   <appender-ref ref="STDOUT" />
> </configuration>
>
> In $TOMCAT6_HOME/conf/server.xml, declare LogbackValve under Engine, as in
>
>  <Engine name="Catalina" defaultHost="localhost">
>    <Valve className="ch.qos.logback.access.tomcat.LogbackValve"/>
>    ...
>
> Please let us know if it works or if it does not.
>
> robin bakkerus wrote:
> > Hi there,
> >
> > Is there a description somewhere how to configure SL4J + Logback in a
> > Tomcat 6 (6.0.18) environment.
> > I followed the steps for Tomcat5 but nothing works!
> >
> > thanks in advance
> >
>
> --
> 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
>



-- 
Robin Bakkerus
robin.bakkerus at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://qos.ch/pipermail/logback-user/attachments/20081209/a06c6f5b/attachment.htm 


More information about the Logback-user mailing list