[logback-user] Jboss + sLF4j + Spring,httpclient logger issue

sridhar veerappan sriasarch at gmail.com
Wed Jun 17 09:26:56 CEST 2009


Hi,
I am new you slf4j using logback.xml, I am trying to integrate with jboss
and spring web service, i am getting the debugger log,
but DEBUG
1) httpclient.wire.header and
2) [org.springframework.web.servlet.DispatcherServlet]
both the above mentioned debug logs are logged into jboss server server.log,
instead of logging to my own log called somelog.log
which i configure in logback.xml

Anything we need to specially configure for these two jars, I think because
jboss is loading their own lib, we need to took the jar files from the ear,
for that we need to configure in logback.xml. But I am not sure how to
configure to put those logs here in my own logger.

<included>
   <appender name="SYSOUT" class="ch.qos.logback.core.ConsoleAppender">
      <layout class="ch.qos.logback.classic.PatternLayout">
         <pattern>%d{ISO8601} [%t] %-5p %lo{40} - %m%n</pattern>
      </layout>
    </appender>
   <!--Daily rolling file appender -->
  <appender name="FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
    <File>${jboss.server.log.dir}/csm.log</File>
  <append>true</append>
    <BufferedIO>false</BufferedIO>
    <!--
    <Encoding>UTF-16</Encoding>
    -->
    <ImmediateFlush>true</ImmediateFlush>
    <rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">

<FileNamePattern>${jboss.server.log.dir}/csm.%d{yyyy-MM-dd}.log.gz</FileNamePattern>
    </rollingPolicy>
    <layout class="ch.qos.logback.classic.PatternLayout">
      <pattern>%date{HH:mm:ss.SSS} [%t] %-5p %-40lo{40} - %m%n</pattern>
    </layout>
  </appender>
   <logger name="com.air2web" additivity="false">
      <appender-ref ref="FILE"/>
      <level value="debug" />
   </logger>
   <logger name="httpclient.wire.header">
<level value="trace"/>
</logger>
 <logger name="httpclient.wire" additivity="false">
           <appender-ref ref="FILE"/>
      <level value="info" />
   </logger>

   <logger name="httpclient.wire.header" additivity="false">
    <appender-ref ref="FILE"/>
    <level value="debug"/>
     <level value="info" />
  </logger>

   <logger name="org.springframework" additivity="false">
    <appender-ref ref="FILE"/>
    <level value="ERROR"/>

  </logger>

  <logger name="org.springframework.web"
>
       <level value="ERROR"/>

    </logger>
     <logger name="org.springframework.ws">
       <level value="ERROR"/>

    </logger>

but not reflecting in log.

Could you please help me.

Thanks in Advance
Sridhar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20090617/41579917/attachment.htm>


More information about the Logback-user mailing list