Package org.apache.commons.jcs3.log
Class Log4j2Factory
java.lang.Object
org.apache.commons.jcs3.log.Log4j2Factory
- All Implemented Interfaces:
LogFactory
This is a SPI factory implementation for log4j2
-
Field Summary
Fields inherited from interface org.apache.commons.jcs3.log.LogFactory
ROOT_LOGGER_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a Log using the fully qualified name of the Class as the Log name.Returns a Log with the specified name.getName()Return the name of the Log subsystem managed by this factoryvoidshutdown()Shutdown the logging system if the logging system supports it.
-
Constructor Details
-
Log4j2Factory
public Log4j2Factory()
-
-
Method Details
-
getName
Return the name of the Log subsystem managed by this factory- Specified by:
getNamein interfaceLogFactory- Returns:
- the name of the log subsystem
-
shutdown
Shutdown the logging system if the logging system supports it.- Specified by:
shutdownin interfaceLogFactory
-
getLog
Returns a Log using the fully qualified name of the Class as the Log name.- Specified by:
getLogin interfaceLogFactory- Parameters:
clazz- The Class whose name should be used as the Log name. If null it will default to the calling class.- Returns:
- The Log.
- Throws:
UnsupportedOperationException- ifclazzisnulland the calling class cannot be determined.
-
getLog
Returns a Log with the specified name.- Specified by:
getLogin interfaceLogFactory- Parameters:
name- The logger name. If null the name of the calling class will be used.- Returns:
- The Log.
- Throws:
UnsupportedOperationException- ifnameisnulland the calling class cannot be determined.
-