[logback-user] exclude a logger in root logger

LongkerDandy longkerdandy at gmail.com
Thu Oct 14 12:58:01 CEST 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20101014/79bcfab6/attachment.html>


More information about the Logback-user mailing list