简体   繁体   English

如何关闭SLF4J日志记录

[英]How to turn off slf4j logging

I'm using third par .jar files in my project. 我在项目中使用了第三方par .jar文件。 When I start my application my standard output is full of log messages. 当我启动应用程序时,我的标准输出中充满了日志消息。 I try to show some informaion to user, but now it's impossible. 我试图向用户显示一些信息,但是现在这是不可能的。 How can I disable logging? 如何禁用日志记录?

This is too generic question. 这个问题太笼统了。 Please be specific about the log message you want to suppress. 请具体说明您要禁止显示的日志消息。

SLF4J implementations have configuration to turn off debug messages eg log4j2.xml uses property for setting logging level. SLF4J实现具有关闭调试消息的配置,例如log4j2.xml使用属性来设置日志记录级别。 Many frameworks like spring/hibernate/jersey have the setting available to set the logging level. 诸如spring / hibernate / jersey的许多框架都有可用于设置日志记录级别的设置。 Here are few links 这里有几个链接

Disabling Spring logging 禁用Spring日志记录

Disabling hibernate logging 禁用休眠日志

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM