java.util.logging.Logger不尊重java.util.logging.Level? [英] java.util.logging.Logger doesn't respect java.util.logging.Level?

查看:112
本文介绍了java.util.logging.Logger不尊重java.util.logging.Level?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在普通的Java SE 6环境中:

In plain Java SE 6 environment:

Logger l = Logger.getLogger("nameless");
l.setLevel(Level.ALL);
l.fine("somemessage");

Eclipse控制台中没有显示任何内容。 l.info()及以上版本工作正常,但 fine 以下的任何内容似乎都不起作用。什么可能是错的?
TIA。

Nothing shows up in Eclipse console. l.info("") and above works just fine, but anything below fine just doesn't seem to work. What's could be wrong? TIA.

推荐答案

即使记录器级别设置为ALL,ConsoleHandler(记录器上的默认处理程序) )仍然具有默认的INFO级别。这来自 JAVA_HOME / jre / lib

Even though the Logger level is set to ALL, the ConsoleHandler (the default Handler on the logger) still has a default level of INFO. This comes from the default logging.properties in JAVA_HOME/jre/lib

这篇关于java.util.logging.Logger不尊重java.util.logging.Level?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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