FileHandler.level不覆盖全局级别
我正在使用jdk日志记录,在logging.properties中有以下内容:FileHandler.level不覆盖全局级别,file,logging,java,java.util.logging,File,Logging,Java,Java.util.logging,我正在使用jdk日志记录,在logging.properties中有以下内容: handlers= java.util.logging.FileHandler .level= INFO java.util.logging.FileHandler.level = FINEST java.util.logging.FileHandler.pattern = log/soap_%g.log java.util.logging.FileHandler.limit = 50000 java.util.l
handlers= java.util.logging.FileHandler
.level= INFO
java.util.logging.FileHandler.level = FINEST
java.util.logging.FileHandler.pattern = log/soap_%g.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.pvm.ccd.service.client=FINEST
com.pvm.ccd.service.client.handler=FINEST
com.pvm.ccd.service.client.util=FINEST
正在创建日志文件soap_0.log和lck文件,但是,我在日志文件中没有看到任何log.fine(msg)条目。因为我已经将FileHandler级别设置为FINEST,所以它应该覆盖全局信息级别,不是吗
我是Java1.6U15。我做错了什么
我也发布了这个问题。来自文档:
假定名称以“.level”结尾的所有属性都定义了记录器的日志级别。因此,“foo.level”为名为“foo”的记录器定义了一个日志级别,并(递归地)为其命名层次结构中的任何子级定义了一个日志级别
以下行不正确:
com.pvm.ccd.service.client=FINEST
com.pvm.ccd.service.client.handler=FINEST
com.pvm.ccd.service.client.util=FINEST
要设置记录器的级别,需要:
com.pvm.ccd.service.client.level=FINEST