[logback-user] logback and Jboss, impossible?
Martyn Hiemstra
m.hiemstra at minihouse.com
Mon May 19 10:44:47 CEST 2008
Hi All
I have looked all over the Internet on how to get logback to work under
Jboss.
I have added the 3 jar files slf4j-api-1.5.0.jar, logback-core-0.9.9.jar
and logback-classic-0.9.9.jar to my project. I can confirm that after
deployment the files are in my projects WEB-INF\lib directory. I have
created a logback.xml file and after deployment the file is in my
projects WEB-INF\classes directory.
I start up jboss and my application works perfectly except logback. No
matter what I do, It just wont initialize. I have no logging to the
console or log files what so ever.
My logback.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender class="ch.qos.logback.core.rolling.RollingFileAppender"
name="RootFileAppender">
<append>true</append>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>debug</level>
</filter>
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>mylogfile.nl.%d{yyyy-MM-dd}.gz</fileNamePattern>
</rollingPolicy>
<layout class="ch.qos.logback.classic.html.HTMLLayout">
<pattern>%d{yyyy-MM-dd HH:mm:ss}%p%t%ex%F%L%C{1}%M %m</pattern>
</layout>
</appender>
<appender class="ch.qos.logback.core.ConsoleAppender"
name="RootConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>debug</level>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%t,%ex,%F,%L,%C{1},%M
%m%n</pattern>
</layout>
</appender>
<root>
<level value="debug"/>
<appender-ref ref="RootFileAppender"/>
<appender-ref ref="RootConsoleAppender"/>
</root>
</configuration>
Thanks in advance,
Martyn
More information about the Logback-user
mailing list