Search code examples
javatomcatpropertieslogging

Why we need two times write handlers in tomcat logging.properties?


From docs:

handlers  = 1catalina.org.apache.juli.FileHandler, \
            2localhost.org.apache.juli.FileHandler, \
            3manager.org.apache.juli.FileHandler, \
            java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.FileHandler, \
            java.util.logging.ConsoleHandler

I didn't found any explanation why need write handlers and after .handlers?

Are there common rules for similar properties files?


Solution

  • The first line declares the set of handlers that can/will be used, the second one assigns handlers to the specific logger (in this case root logger as .handlers is not prefixed with anything).

    Later on in logging.properties each handler is configured.