Package org.apache.commons.jcs3.log
Class LogManager
java.lang.Object
org.apache.commons.jcs3.log.LogManager
This is a borrowed and stripped-down version of the log4j2 LogManager class.
The anchor point for the JCS logging system. The most common usage of this
class is to obtain a named
Log
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Log
Returns a Log using the fully qualified name of the Class as the Log name.static Log
Returns a Log with the specified name.static Log
Returns the root logger.static void
setLogSystem
(String logSystem) Set the log system.static void
shutdown()
Shutdown the logging system if the logging system supports it.
-
Field Details
-
LOGSYSTEM_JAVA_UTIL_LOGGING
Log systems currently known- See Also:
-
LOGSYSTEM_LOG4J2
- See Also:
-
-
Constructor Details
-
LogManager
protected LogManager()Prevents instantiation
-
-
Method Details
-
setLogSystem
Set the log system. Must be called before getLog is called- Parameters:
logSystem
- the logSystem to set
-
shutdown
Shutdown the logging system if the logging system supports it. -
getLog
Returns a Log using the fully qualified name of the Class as the Log name.- Parameters:
clazz
- The Class whose name should be used as the Log name.- Returns:
- The Log.
- Throws:
UnsupportedOperationException
- ifclazz
isnull
-
getLog
Returns a Log with the specified name.- Parameters:
name
- The logger name.- Returns:
- The Log.
- Throws:
UnsupportedOperationException
- ifname
isnull
-
getRootLogger
Returns the root logger.- Returns:
- the root logger, named
LogFactory.ROOT_LOGGER_NAME
.
-