logback.xml类过滤器配置需要推送

时间:2015-09-20 13:47:27

标签: java slf4j logback

首先,我的logback.xml文件:

<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <pattern>%d{HH:mm:ss.SSS} %-5level %logger{25} - %msg%n</pattern>
        </encoder>
    </appender>

    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <File>${catalina.base}/logs/server.log</File>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <FileNamePattern>server.%d{yyyy-MM-dd}.log</FileNamePattern>
        </rollingPolicy>
        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <pattern>%d %-5p %C{1} - %m%n</pattern>
        </encoder>
    </appender>

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

这很简单。我有很多来自

的日志
2015-09-20 15:37:10,013 INFO  o.s.b.f.x.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [adf-context.xml]
2015-09-20 15:37:09,985 INFO  o.s.b.f.x.XmlBeanDefinitionReader - Loading XML bean definitions from URL ...

我想简单地删除它们(过滤器)我正在寻找解决方案,我发现这个http://logback.qos.ch/manual/filters.html一切都很酷但我找不到能帮助我通过匹配课程来过滤的东西甚至单词匹配 XmlBeanDefinitionReader 你能推动我并帮助轻松过滤单词或课程吗?

0 个答案:

没有答案