The Java log configuration file allows me to define the properties of a named logger, for example
name.heikoseeberger.heikotron.level = FINE
name.heikoseeberger.heikotron.handlers = java.util.logging.FileHandler
So far so good. Now I would like to configure that particular FileHandler, for example. with a specific output file. Unfortunately, I know how to configure the "global" FileHandler, which is already present in the configuration file:
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
I do not want to configure this, but the instance associated with my own Logger. I have already tried the following, but to no avail:
name.heikoseeberger.heikotron.java.util.logging.FileHandler.pattern = %h/heikotron.log
name.heikoseeberger.heikotron.java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
Is it even possible to set the properties of specific instances of FileHandler? If so, how to identify / name them?
source
share