Package org.apache.logging.log4j.jul
Class LogManager
- java.lang.Object
-
- java.util.logging.LogManager
-
- org.apache.logging.log4j.jul.LogManager
-
public class LogManager extends java.util.logging.LogManager
Log4j implementation ofLogManager
. Note that the system propertyjava.util.logging.manager
must be set toorg.apache.logging.log4j.jul.LogManager
in order to use this adaptor. This LogManager requires thelog4j-api
library to be available. Iflog4j-core
is also available, then more features ofLogger
are supported.To override the default
AbstractLoggerAdapter
that is used, specify the Log4j propertylog4j.jul.LoggerAdapter
and set it to the fully qualified class name of a custom implementation. All implementations must have a default constructor.- Since:
- 2.1
-
-
Field Summary
Fields Modifier and Type Field Description private static Logger
LOGGER
private AbstractLoggerAdapter
loggerAdapter
private java.lang.ThreadLocal<java.util.Set<java.lang.String>>
recursive
-
Constructor Summary
Constructors Constructor Description LogManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addLogger(java.util.logging.Logger logger)
java.util.logging.Logger
getLogger(java.lang.String name)
java.util.Enumeration<java.lang.String>
getLoggerNames()
-
-
-
Field Detail
-
LOGGER
private static final Logger LOGGER
-
loggerAdapter
private final AbstractLoggerAdapter loggerAdapter
-
recursive
private final java.lang.ThreadLocal<java.util.Set<java.lang.String>> recursive
-
-
Method Detail
-
addLogger
public boolean addLogger(java.util.logging.Logger logger)
- Overrides:
addLogger
in classjava.util.logging.LogManager
-
getLogger
public java.util.logging.Logger getLogger(java.lang.String name)
- Overrides:
getLogger
in classjava.util.logging.LogManager
-
getLoggerNames
public java.util.Enumeration<java.lang.String> getLoggerNames()
- Overrides:
getLoggerNames
in classjava.util.logging.LogManager
-
-