如何关闭slf4j的日志记录

编程入门 行业动态 更新时间:2024-10-25 17:30:36
本文介绍了如何关闭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的日志记录

本文发布于:2023-11-25 03:57:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1628224.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:日志   slf4j

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!