如何关闭slf4j的日志记录 [英] How to turn off logging from slf4j

查看:1492
本文介绍了如何关闭slf4j的日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是第三方应用程序在我们的应用程序服务器上生成大量的logentries。像这样:

It's a third party application generating huge amounts of logentries on our appserver. Like this:

[03.03.10 15:21:57:250 CET] 00000180 FtpProtocolHa I org.slf4j.impl.JCLLoggerAdapter info Close connection : 10.227.10.10 - admin
[03.03.10 15:27:35:209 CET] 00000181 MinaFtpProtoc I org.slf4j.impl.JCLLoggerAdapter info [/10.227.10.10] CLOSED
++++

如何关闭slf4j的输出?我查看了.war文件,找到slf4j的一些配置,但没有。他们的网站没有帮助

How do I turn this output from slf4j off? I've looked in the .war-file to find some configuration for slf4j but nothing. Their website didn't help either

推荐答案

slf4j只是实际日志后端的漏斗(这里重写jakarta commons日志记录),这是您必须配置以摆脱某种消息的那个。对于logback,这是相应的配置代码段:

slf4j is just a funnel to the actual log backend (here overriding jakarta commons logging), which is the one you must configure to get rid of a certain kind of messages. For logback this is the appropriate configuration snippet:

    <!--  No Tomcat debug logs -->
    <configuration>
    ...
        <logger name="org.apache.catalina.core" level="OFF" />
    ...
    </configuration>

对于log4j,它非常相似。

For log4j it is very similar.

这篇关于如何关闭slf4j的日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆