[英]How do I disable jose4j log messages through my log4j config?
I am using jose4j in a java application that I am working on. 我正在使用的Java应用程序中使用jose4j 。 It is a json web token library, and I've found that putting the package name inside my log4j config file does nothing to quiet the (many) debug logging messages that I am seeing from this thing.
这是一个json网络令牌库,我发现将包名放在我的log4j配置文件中并没有使我从此东西中看到的(许多)调试日志消息安静下来。 Here's my relevant log4j config section
这是我相关的log4j配置部分
<Root level="debug">
<AppenderRef ref="Console"></AppenderRef>
</Root>
<Logger name="org.jose4j" level="warn" additivity="false">
<AppenderRef ref="Console"></AppenderRef>
</Logger>
So, I essentially only want to see log messages from jose4j when they rise to the level of warn (or more dire). 因此,我基本上只希望看到jose4j的日志消息上升到警告级别(或更严重)。
A few things I have been able to gather. 我已经收集了几件事。
Setting the root logger to "info" does make the jose4j debug messages go away, so jose4j's logger at least knows about my logging setup. 将根记录器设置为“ info”确实会使jose4j调试消息消失,因此jose4j的记录器至少知道我的日志记录设置。
It looks like the logger that jose4j uses is org.sl4j 看起来jose4j使用的记录器是org.sl4j
I had a similar issue yesterday. 昨天我有一个类似的问题 。 It seemed like adding a few jars did the trick to fix that issue, but I'm not having luck with this.
似乎添加几个罐子可以解决该问题,但是我对此并不走运。
I also added this jar to the classpath... this also did not work. 我也将此罐子添加到类路径中...这也没有用。
Does anyone know how I can get this library to work with my logging setup? 有谁知道我如何使该库与我的日志记录设置一起使用?
Two points: 两点:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.