Class Log4j2Logger
java.lang.Object
org.apache.fulcrum.yaafi.framework.logger.Log4j2Logger
- All Implemented Interfaces:
org.apache.avalon.framework.logger.Logger
A Log4J2 wrapper class for Logger.
Replaces same class in Fulcrum Testcontainer and Turbine
- Author:
- Georg Kallidis
-
Constructor Summary
ConstructorsConstructorDescriptionLog4j2Logger(org.apache.logging.log4j.Logger logImpl) Create a logger that delegates to specified category. -
Method Summary
Modifier and TypeMethodDescriptionvoidLog a debug message.voidLog a debug message.voidLog a error message.voidLog a error message.voidfatalError(String message) Log a fatalError message.voidfatalError(String message, Throwable throwable) Log a fatalError message.org.apache.avalon.framework.logger.LoggergetChildLogger(String name) Create a new child logger.voidLog a info message.voidLog a info message.booleanDetermine if messages of priority "debug" will be logged.booleanDetermine if messages of priority "error" will be logged.booleanDetermine if messages of priority "fatalError" will be logged.booleanDetermine if messages of priority "info" will be logged.booleanDetermine if messages of priority "warn" will be logged.voidLog a warn message.voidLog a warn message.
-
Constructor Details
-
Log4j2Logger
public Log4j2Logger(org.apache.logging.log4j.Logger logImpl) Create a logger that delegates to specified category.- Parameters:
logImpl- the category to delegate to
-
-
Method Details
-
debug
Log a debug message.- Specified by:
debugin interfaceorg.apache.avalon.framework.logger.Logger- Parameters:
message- the message
-
debug
Log a debug message.- Specified by:
debugin interfaceorg.apache.avalon.framework.logger.Logger- Parameters:
message- the messagethrowable- the throwable
-
isDebugEnabled
public boolean isDebugEnabled()Determine if messages of priority "debug" will be logged.- Specified by:
isDebugEnabledin interfaceorg.apache.avalon.framework.logger.Logger- Returns:
- true if "debug" messages will be logged
-
info
Log a info message.- Specified by:
infoin interfaceorg.apache.avalon.framework.logger.Logger- Parameters:
message- the message
-
info
Log a info message.- Specified by:
infoin interfaceorg.apache.avalon.framework.logger.Logger- Parameters:
message- the messagethrowable- the throwable
-
isInfoEnabled
public boolean isInfoEnabled()Determine if messages of priority "info" will be logged.- Specified by:
isInfoEnabledin interfaceorg.apache.avalon.framework.logger.Logger- Returns:
- true if "info" messages will be logged
-
warn
Log a warn message.- Specified by:
warnin interfaceorg.apache.avalon.framework.logger.Logger- Parameters:
message- the message
-
warn
Log a warn message.- Specified by:
warnin interfaceorg.apache.avalon.framework.logger.Logger- Parameters:
message- the messagethrowable- the throwable
-
isWarnEnabled
public boolean isWarnEnabled()Determine if messages of priority "warn" will be logged.- Specified by:
isWarnEnabledin interfaceorg.apache.avalon.framework.logger.Logger- Returns:
- true if "warn" messages will be logged
-
error
Log a error message.- Specified by:
errorin interfaceorg.apache.avalon.framework.logger.Logger- Parameters:
message- the message
-
error
Log a error message.- Specified by:
errorin interfaceorg.apache.avalon.framework.logger.Logger- Parameters:
message- the messagethrowable- the throwable
-
isErrorEnabled
public boolean isErrorEnabled()Determine if messages of priority "error" will be logged.- Specified by:
isErrorEnabledin interfaceorg.apache.avalon.framework.logger.Logger- Returns:
- true if "error" messages will be logged
-
fatalError
Log a fatalError message.- Specified by:
fatalErrorin interfaceorg.apache.avalon.framework.logger.Logger- Parameters:
message- the message
-
fatalError
Log a fatalError message.- Specified by:
fatalErrorin interfaceorg.apache.avalon.framework.logger.Logger- Parameters:
message- the messagethrowable- the throwable
-
isFatalErrorEnabled
public boolean isFatalErrorEnabled()Determine if messages of priority "fatalError" will be logged.- Specified by:
isFatalErrorEnabledin interfaceorg.apache.avalon.framework.logger.Logger- Returns:
- true if "fatalError" messages will be logged
-
getChildLogger
Create a new child logger. The name of the child logger is [current-loggers-name].[passed-in-name] ThrowsIllegalArgumentExceptionif name has an empty element name- Specified by:
getChildLoggerin interfaceorg.apache.avalon.framework.logger.Logger- Parameters:
name- the subname of this logger- Returns:
- the new logger
-