Package org.apache.log4j
Class LogManager
java.lang.Object
org.apache.log4j.LogManager
The main entry point to Log4j 1.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.This variable is for internal use only.static final StringDeprecated.This variable is for internal use only.static final StringDeprecated.This variable is for internal use only.static final StringDeprecated.This variable is for internal use only. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LoggerTests if a logger for the given name exists.static EnumerationGets an enumeration of the current loggers.static LoggerGets the logger for the given class.static LoggerGets the logger for the given name.static LoggergetLogger(String name, LoggerFactory factory) static LoggerRepositorystatic LoggerGets the root logger.static voidstatic voidsetRepositorySelector(RepositorySelector selector, Object guard) static voidshutdown()Shuts down the current configuration.
-
Field Details
-
DEFAULT_CONFIGURATION_FILE
Deprecated.This variable is for internal use only. It will become package protected in future versions.- See Also:
-
DEFAULT_CONFIGURATION_KEY
Deprecated.This variable is for internal use only. It will become private in future versions.- See Also:
-
CONFIGURATOR_CLASS_KEY
Deprecated.This variable is for internal use only. It will become private in future versions.- See Also:
-
DEFAULT_INIT_OVERRIDE_KEY
Deprecated.This variable is for internal use only. It will become private in future versions.- See Also:
-
-
Constructor Details
-
LogManager
public LogManager()
-
-
Method Details
-
exists
Tests if a logger for the given name exists.- Parameters:
name- logger name to test.- Returns:
- whether a logger for the given name exists.
-
getCurrentLoggers
Gets an enumeration of the current loggers.- Returns:
- an enumeration of the current loggers.
-
getLogger
Gets the logger for the given class. -
getLogger
Gets the logger for the given name. -
getLogger
-
getLoggerRepository
-
getRootLogger
Gets the root logger. -
resetConfiguration
public static void resetConfiguration() -
setRepositorySelector
public static void setRepositorySelector(RepositorySelector selector, Object guard) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
shutdown
public static void shutdown()Shuts down the current configuration.
-