How to enable FINE logging for a single java class

前端 未结 5 1215
温柔的废话
温柔的废话 2021-01-21 06:13

I\'m using java.util.logging.Logger logging in my program. How do I enable FINE logging for a single class, while setting it to WARNING for every othe

5条回答
  •  一整个雨季
    2021-01-21 06:35

    I believe that you can set your log level for your Handler and your specific class Logger to FINE, while keeping all the other Loggers for the rest of your code base to WARNING should do the trick. Both the Logger and the Handler need to pass the level filter for a message to be logged.

提交回复
热议问题