[logback-user] logback and Jboss, impossible?
Martyn Hiemstra
m.hiemstra at minihouse.com
Mon May 19 15:31:44 CEST 2008
Hi Ceki,
I just figured it out. I read a manual of setting up jndi logging and
that did the charm. The link to the website is:
http://logback.qos.ch/manual/contextSelector.html
Martyn Hiemstra
Ceki Gulcu schreef:
>
>
> Martyn,
>
> In principle, Jboss does not know about logback and should not
> interfere with it.
>
> When you say that logback won't initialize, do you mean that it won't
> pickup your logback.xml file or do you mean that logback will not even
> use it's default internal configuration which writes on the console?
>
>
>
> Martyn Hiemstra wrote:
>> 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
>>
>> _______________________________________________
>> Logback-user mailing list
>> Logback-user at qos.ch
>> http://qos.ch/mailman/listinfo/logback-user
>>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
>
More information about the Logback-user
mailing list