public final class Log4j2Logger extends Object implements org.apache.avalon.framework.logger.Logger
Constructor and Description |
---|
Log4j2Logger(org.apache.logging.log4j.Logger logImpl)
Create a logger that delegates to specified category.
|
Modifier and Type | Method and Description |
---|---|
void |
debug(String message)
Log a debug message.
|
void |
debug(String message,
Throwable throwable)
Log a debug message.
|
void |
error(String message)
Log a error message.
|
void |
error(String message,
Throwable throwable)
Log a error message.
|
void |
fatalError(String message)
Log a fatalError message.
|
void |
fatalError(String message,
Throwable throwable)
Log a fatalError message.
|
org.apache.avalon.framework.logger.Logger |
getChildLogger(String name)
Create a new child logger.
|
void |
info(String message)
Log a info message.
|
void |
info(String message,
Throwable throwable)
Log a info message.
|
boolean |
isDebugEnabled()
Determine if messages of priority "debug" will be logged.
|
boolean |
isErrorEnabled()
Determine if messages of priority "error" will be logged.
|
boolean |
isFatalErrorEnabled()
Determine if messages of priority "fatalError" will be logged.
|
boolean |
isInfoEnabled()
Determine if messages of priority "info" will be logged.
|
boolean |
isWarnEnabled()
Determine if messages of priority "warn" will be logged.
|
void |
warn(String message)
Log a warn message.
|
void |
warn(String message,
Throwable throwable)
Log a warn message.
|
public Log4j2Logger(org.apache.logging.log4j.Logger logImpl)
logImpl
- the category to delegate topublic void debug(String message)
debug
in interface org.apache.avalon.framework.logger.Logger
message
- the messagepublic void debug(String message, Throwable throwable)
debug
in interface org.apache.avalon.framework.logger.Logger
message
- the messagethrowable
- the throwablepublic boolean isDebugEnabled()
isDebugEnabled
in interface org.apache.avalon.framework.logger.Logger
public void info(String message)
info
in interface org.apache.avalon.framework.logger.Logger
message
- the messagepublic void info(String message, Throwable throwable)
info
in interface org.apache.avalon.framework.logger.Logger
message
- the messagethrowable
- the throwablepublic boolean isInfoEnabled()
isInfoEnabled
in interface org.apache.avalon.framework.logger.Logger
public void warn(String message)
warn
in interface org.apache.avalon.framework.logger.Logger
message
- the messagepublic void warn(String message, Throwable throwable)
warn
in interface org.apache.avalon.framework.logger.Logger
message
- the messagethrowable
- the throwablepublic boolean isWarnEnabled()
isWarnEnabled
in interface org.apache.avalon.framework.logger.Logger
public void error(String message)
error
in interface org.apache.avalon.framework.logger.Logger
message
- the messagepublic void error(String message, Throwable throwable)
error
in interface org.apache.avalon.framework.logger.Logger
message
- the messagethrowable
- the throwablepublic boolean isErrorEnabled()
isErrorEnabled
in interface org.apache.avalon.framework.logger.Logger
public void fatalError(String message)
fatalError
in interface org.apache.avalon.framework.logger.Logger
message
- the messagepublic void fatalError(String message, Throwable throwable)
fatalError
in interface org.apache.avalon.framework.logger.Logger
message
- the messagethrowable
- the throwablepublic boolean isFatalErrorEnabled()
isFatalErrorEnabled
in interface org.apache.avalon.framework.logger.Logger
public org.apache.avalon.framework.logger.Logger getChildLogger(String name)
IllegalArgumentException
if name has an empty element namegetChildLogger
in interface org.apache.avalon.framework.logger.Logger
name
- the subname of this loggerCopyright © 2000–2019 The Apache Software Foundation. All rights reserved.