Modifying java.util.logging.SimpleFormatter format property under Tomcat

后端 未结 5 2014
孤街浪徒
孤街浪徒 2020-12-15 21:04

I am using Tomcat 7.0.28, running under OpenJDK 1.7 on Ubuntu, and am trying to modify the formatting string used by java.util.logging.SimpleFormatter. According to the Jav

5条回答
  •  伪装坚强ぢ
    2020-12-15 21:28

    Don't know if this will solve your problem, but it may be worth a try. I was seeing the same behavior, although in my case I was doing the logging setup programmatically instead of using properties. Turns out that the property value for java.util.logging.SimpleFormatter.format needs to be set BEFORE constructing the (in my case) FileHandler. I was setting it after constructing the FileHandler, but before constructing SimpleFormatter. I wonder if, in your properties file, defining java.util.logging.SimpleFormatter.format BEFORE defining any of the Handler properties will solve the problem.

提交回复
热议问题