Subclassing java.util.logging.Formatter doesn't work

后端 未结 5 868
自闭症患者
自闭症患者 2021-01-06 16:23

I am using java.util.logging for logging (I don\'t want to use log4j or anything else).

This is my complete private logging.properties:

         


        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-06 17:01

    How do I figure out why FileHandler isn't using my LogFormatter class?

    Start the program in a debugger and step through the code. Set a breakpoint in LogManager.getLogger() and/or LogManager.readConfiguration()

    Or forget about java.util.logging and use a framework like logback that is easy to configure and gives you useful error messages when something is wrong.

提交回复
热议问题