You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marc Ende <ml...@e-beyond.de> on 2009/04/08 22:57:41 UTC

wicket, slf4j and logback

Hi,

I've changed from logging using log4j to logback but there is a little
drawback I haven't figured out in this combination.

I've got this logback.xml:
<configuration>
  <appender name="FILE" class="ch.qos.logback.core.FileAppender">
    <file>${jboss.server.log.dir}/wz.log</file>
    <layout class="ch.qos.logback.classic.PatternLayout">
      <!-- Pattern>%date %level [%thread] %logger{10} [%file:%line]
%msg%n</Pattern -->
      <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
%msg%n</Pattern>
    </layout>
  </appender>
  <logger name="org.apache.wicket" level="INFO"/>
  <logger name="org" level="INFO"/>
  <root level="DEBUG">
    <appender-ref ref="FILE" />
  </root>
</configuration>

Everything works great. After changing the Pattern the layout also
changes. But whenever I call a site I got the whole debug even if I've
changed the logger for "org" or "org.apache.wicket" to INFO.
These settings are okay as long as the thread is "ScannerThread" (might
be something of jboss). If it's a thread in the normal usage the
patterns are applied correctly but the loggers are ignored completely.

I've used logback in another web project where it's doing it's job.

Does anybody has also this combination?

Thanks for your help!!!

marc


Re: wicket, slf4j and logback

Posted by Marc Ende <ml...@e-beyond.de>.
Hi,

solution found: old libs and a wrong configuration...

Sorry for disturbing...

marc

Marc Ende schrieb:
> Hi,
>
> I've changed from logging using log4j to logback but there is a little
> drawback I haven't figured out in this combination.
>
> I've got this logback.xml:
> <configuration>
>   <appender name="FILE" class="ch.qos.logback.core.FileAppender">
>     <file>${jboss.server.log.dir}/wz.log</file>
>     <layout class="ch.qos.logback.classic.PatternLayout">
>       <!-- Pattern>%date %level [%thread] %logger{10} [%file:%line]
> %msg%n</Pattern -->
>       <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
> %msg%n</Pattern>
>     </layout>
>   </appender>
>   <logger name="org.apache.wicket" level="INFO"/>
>   <logger name="org" level="INFO"/>
>   <root level="DEBUG">
>     <appender-ref ref="FILE" />
>   </root>
> </configuration>
>
> Everything works great. After changing the Pattern the layout also
> changes. But whenever I call a site I got the whole debug even if I've
> changed the logger for "org" or "org.apache.wicket" to INFO.
> These settings are okay as long as the thread is "ScannerThread" (might
> be something of jboss). If it's a thread in the normal usage the
> patterns are applied correctly but the loggers are ignored completely.
>
> I've used logback in another web project where it's doing it's job.
>
> Does anybody has also this combination?
>
> Thanks for your help!!!
>
> marc
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org