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.LogManagerLog4j implementation ofLogManager. Note that the system propertyjava.util.logging.managermust be set toorg.apache.logging.log4j.jul.LogManagerin order to use this adaptor. This LogManager requires thelog4j-apilibrary to be available. Iflog4j-coreis also available, then more features ofLoggerare supported.To override the default
AbstractLoggerAdapterthat is used, specify the Log4j propertylog4j.jul.LoggerAdapterand 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 LoggerLOGGERprivate AbstractLoggerAdapterloggerAdapterprivate 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 booleanaddLogger(java.util.logging.Logger logger)java.util.logging.LoggergetLogger(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:
addLoggerin classjava.util.logging.LogManager
-
getLogger
public java.util.logging.Logger getLogger(java.lang.String name)
- Overrides:
getLoggerin classjava.util.logging.LogManager
-
getLoggerNames
public java.util.Enumeration<java.lang.String> getLoggerNames()
- Overrides:
getLoggerNamesin classjava.util.logging.LogManager
-
-