Track printing blank lines instead of filtered output

I am using Logback on a project with a Marker TurboFilter to filter information marked with a given marker.

I currently claim that I do not want to output the VERBOSE_INFO and STD_INFO logs.

The problem I am running into is that it appears that the Fallback Completion mode still prints blank lines instead of the filtered information.

<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
        <pattern>
            %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
        </pattern>
    </encoder>
</appender>
<!-- %-4relative [%thread] %-5level %logger{35} - %msg%n -->
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
    <file>ms-log.log</file>
    <append>false</append>
    <encoder>
      <pattern>%d %5p %c{1}:%L - %m%n</pattern>
    </encoder>
</appender>

<turboFilter class="ch.qos.logback.classic.turbo.MarkerFilter">
    <Marker>VERBOSE_INFO</Marker>
    <OnMatch>ALLOW</OnMatch>
</turboFilter>

<turboFilter class="ch.qos.logback.classic.turbo.MarkerFilter">
    <Marker>STD_INFO</Marker>
    <OnMatch>DENY</OnMatch>
</turboFilter>

<root level="INFO">
    <appender-ref ref="STDOUT" />
    <appender-ref ref="FILE" />
</root>

      

Result:

2013-02-19 11:35:59,757 INFO u.c.d.m.i.m.LanguageParser:88 - Initialising...


2013-02-19 11:35:59,777 INFO u.c.d.m.i.m.LanguageParser:88 - Initialisation Complete.





2013-02-19 11:35:59,788 INFO u.c.d.m.i.m.LanguageParser:88 - Restoring Saved State...





2013-02-19 11:35:59,798 INFO u.c.d.m.i.m.LanguageParser:88 - Saved State Successfully Restored.

      

Thanks so much for any help you can give x.

+3


source to share





All Articles