public final class LogManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONFIGURATOR_CLASS_KEY
Deprecated.
This variable is for internal use only. It will become private in future versions.
|
static String |
DEFAULT_CONFIGURATION_FILE
Deprecated.
This variable is for internal use only. It will become package protected in future versions.
|
static String |
DEFAULT_CONFIGURATION_KEY
Deprecated.
This variable is for internal use only. It will become private in future versions.
|
static String |
DEFAULT_INIT_OVERRIDE_KEY
Deprecated.
This variable is for internal use only. It will become private in future versions.
|
Constructor and Description |
---|
LogManager() |
Modifier and Type | Method and Description |
---|---|
static Logger |
exists(String name)
Tests if a logger for the given name exists.
|
static Enumeration |
getCurrentLoggers()
Gets an enumeration of the current loggers.
|
static Logger |
getLogger(Class<?> clazz)
Gets the logger for the given class.
|
static Logger |
getLogger(String name)
Gets the logger for the given name.
|
static Logger |
getLogger(String name,
LoggerFactory factory) |
static LoggerRepository |
getLoggerRepository() |
static Logger |
getRootLogger()
Gets the root logger.
|
static void |
resetConfiguration() |
static void |
setRepositorySelector(RepositorySelector selector,
Object guard) |
static void |
shutdown()
Shuts down the current configuration.
|
@Deprecated public static final String DEFAULT_CONFIGURATION_FILE
@Deprecated public static final String DEFAULT_CONFIGURATION_KEY
@Deprecated public static final String CONFIGURATOR_CLASS_KEY
@Deprecated public static final String DEFAULT_INIT_OVERRIDE_KEY
public static Logger exists(String name)
name
- logger name to test.public static Enumeration getCurrentLoggers()
public static Logger getLogger(String name, LoggerFactory factory)
public static LoggerRepository getLoggerRepository()
public static Logger getRootLogger()
public static void resetConfiguration()
public static void setRepositorySelector(RepositorySelector selector, Object guard) throws IllegalArgumentException
IllegalArgumentException
public static void shutdown()
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.