[logback-user] exclude a logger in root logger

Ceki Gülcü ceki at qos.ch
Sat Oct 16 13:36:34 CEST 2010


Hello,

Have a look at
http://logback.qos.ch/manual/configuration.html#cumulative
and
http://logback.qos.ch/manual/configuration.html#overrridingCumulativity

HTH,

On 14/10/2010 12:58 PM, LongkerDandy wrote:
> Hi
>
> I've write a config like this
>
> <configuration>
>
> <appender name="Chii2FILE" class="ch.qos.logback.core.FileAppender">
> <file>log/chii2.log</file>
>
> <encoder>
> <pattern>%date{yyyy-MM-dd HH:mm:ss} [%level] %logger{50} [%file:%line]
> %msg%n</pattern>
> </encoder>
> </appender>
>
> <appender name="FILE" class="ch.qos.logback.core.FileAppender">
> <file>log/platform.log</file>
>
> <encoder>
> <pattern>%date{yyyy-MM-dd HH:mm:ss} [%level] %logger{50} [%file:%line]
> %msg%n</pattern>
> </encoder>
> </appender>
>
> <logger name="org.chii2" level="debug">
> <appender-ref ref="Chii2FILE"/>
> </logger>
>
> <root level="warn">
> <appender-ref ref="FILE" />
> </root>
>
> </configuration>
>
> The problem is, all the log in chii2.log will repeat in platform.log.
> I want separate my project's log from others.
> How can I do that?
>
> Regards
> LongkerDandy
>


More information about the Logback-user mailing list