Spring Boot-设置使用Java Util日志记录(jul)的外部jar的日志记录级别 [英] Spring Boot - set logging level of external jar which is using Java Util Logging (jul)

查看:207
本文介绍了Spring Boot-设置使用Java Util日志记录(jul)的外部jar的日志记录级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据Spring Boot文档,仅通过使用Spring Boot Logging Starter并在应用程序属性中设置适当的logging.level,就可以设置多个日志记录框架(jul,slf4j等)的日志记录级别.一切工作正常,除了我使用的库以jul和日志级别Level.FINER进行记录.但是,Level.INFO已正确记录.

According to the Spring Boot documentation, it is possible to set the logging level of multiple logging framework (jul, slf4j, etc.) just by using the Spring Boot Logging Starter and setting appropriate logging.level in application properties. Everything works fine except that the library I use is logging with jul and log level Level.FINER. However, Level.INFO is properly logged.

我在application.properties中将级别设置为:

I set level in application.properties to:

logging.level.=TRACE

应该根据 SLF4JBridgeHandler 记录所有内容.

which should log everything according to SLF4JBridgeHandler.

我是否缺少某些东西?或者是回溯(初学者使用)的问题,而不是我的误解吗?

Am I something missing or is it a problem of logback (used by the starter) rather my misunderstanding?

推荐答案

请参阅我的相关答案: https://stackoverflow.com /a/33770877/3004042

Please see my related answer: https://stackoverflow.com/a/33770877/3004042

简而言之,将Spring Boot版本1.3.0与Logback结合使用.

In short, use Spring Boot version 1.3.0 with Logback.

这篇关于Spring Boot-设置使用Java Util日志记录(jul)的外部jar的日志记录级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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