Package org.apache.logging.log4j.jul
package org.apache.logging.log4j.jul
-
ClassDescriptionAbstract Logger registry.Log4j API implementation of the JUL
Loggerclass.Loggerregistry implementation using just log4j-api.Constants for the JUL adapter.Log4j Core implementation of the JULLoggerclass.Loggerregistry implementation that uses log4j-core.Default implementation of LevelConverter strategy.Utility class to convert between JDK Levels and Log4j 2 Levels.Bridge from JUL to log4j2.
This is an alternative to log4j.jul.LogManager (running as complete JUL replacement), especially useful for webapps running on a container for which the LogManager cannot or should not be used.
Installation/usage: Declaratively inside JUL'slogging.properties:
handlers = org.apache.logging.log4j.jul.Log4jBridgeHandler
(and typically also:org.apache.logging.log4j.jul.Log4jBridgeHandler.propagateLevels = true)
Note: in a webapp running on Tomcat, you may create aWEB-INF/classes/logging.propertiesfile to configure JUL for this webapp only: configured handlers and log levels affect your webapp only! This file is then the complete JUL configuration, so JUL's defaults (e.g.Log4j implementation ofLogManager.Dummy version of a java.util.Logger.Wrapper class to ensure proper FQCN support in Logger calls.