public final class NOPLogger extends Logger
| Constructor and Description |
|---|
NOPLogger(NOPLoggerRepository repo,
String name)
Create instance of Logger.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAppender(Appender newAppender)
Add
newAppender to the list of appenders of this Category instance. |
void |
assertLog(boolean assertion,
String msg)
|
void |
callAppenders(LoggingEvent event)
Call the appenders in the hierrachy starting at
this. |
void |
debug(Object message) |
void |
debug(Object message,
Throwable t) |
void |
error(Object message) |
void |
error(Object message,
Throwable t) |
void |
fatal(Object message) |
void |
fatal(Object message,
Throwable t) |
Enumeration |
getAllAppenders()
Get all the Log4j 1.x appenders contained in this category as an
Enumeration. |
Appender |
getAppender(String name)
Look for the appender named as
name. |
Priority |
getChainedPriority() |
Level |
getEffectiveLevel() |
ResourceBundle |
getResourceBundle() |
void |
info(Object message) |
void |
info(Object message,
Throwable t) |
boolean |
isAttached(Appender appender)
Is the appender passed as parameter attached to this category?
|
boolean |
isDebugEnabled() |
boolean |
isEnabledFor(Priority level) |
boolean |
isInfoEnabled() |
boolean |
isTraceEnabled() |
void |
l7dlog(Priority priority,
String key,
Object[] params,
Throwable t) |
void |
l7dlog(Priority priority,
String key,
Throwable t) |
void |
log(Priority priority,
Object message) |
void |
log(Priority priority,
Object message,
Throwable t) |
void |
log(String callerFQCN,
Priority level,
Object message,
Throwable t) |
void |
removeAllAppenders()
Removes all previously added appenders from this Category instance.
|
void |
removeAppender(Appender appender)
Removes the appender passed as parameter form the list of appenders.
|
void |
removeAppender(String name)
Removes the appender with the name passed as parameter form the list of appenders.
|
void |
setLevel(Level level) |
void |
setPriority(Priority priority) |
void |
setResourceBundle(ResourceBundle bundle) |
void |
trace(Object message) |
void |
trace(Object message,
Throwable t) |
void |
warn(Object message) |
void |
warn(Object message,
Throwable t) |
getLogger, getLogger, getLogger, getRootLoggerexists, forcedLog, getAdditivity, getCurrentCategories, getDefaultHierarchy, getHierarchy, getInstance, getInstance, getLevel, getLoggerRepository, getName, getParent, getPriority, getRoot, isErrorEnabled, isFatalEnabled, isWarnEnabled, setAdditivity, shutdownpublic NOPLogger(NOPLoggerRepository repo, String name)
repo - repository, may not be null.name - name, may not be null, use "root" for root logger.public void addAppender(Appender newAppender)
newAppender to the list of appenders of this Category instance.
If newAppender is already in the list of appenders, then it won't be added again.
addAppender in interface AppenderAttachableaddAppender in class CategorynewAppender - The Appender to add.public void assertLog(boolean assertion,
String msg)
assertion parameter is false, then logs msg as an error
statement.
The assert method has been renamed to assertLog because assert is a language
reserved word in JDK 1.4.
public void callAppenders(LoggingEvent event)
this. If no appenders could be found, emit a warning.
This method calls all the appenders inherited from the hierarchy circumventing any evaluation of whether to log or not to log the particular log request.
callAppenders in class Categoryevent - the event to log.public Enumeration getAllAppenders()
Enumeration. Log4j 2.x appenders are omitted.getAllAppenders in interface AppenderAttachablegetAllAppenders in class Categorypublic Appender getAppender(String name)
name.
Return the appender with that name if in the list. Return null otherwise.
getAppender in interface AppenderAttachablegetAppender in class Categoryname - The name of the Appender.public Priority getChainedPriority()
getChainedPriority in class Categorypublic Level getEffectiveLevel()
getEffectiveLevel in class Categorypublic ResourceBundle getResourceBundle()
getResourceBundle in class Categorypublic boolean isAttached(Appender appender)
isAttached in interface AppenderAttachableisAttached in class Categoryappender - The Appender to add.public boolean isDebugEnabled()
isDebugEnabled in class Categorypublic boolean isEnabledFor(Priority level)
isEnabledFor in class Categorypublic boolean isInfoEnabled()
isInfoEnabled in class Categorypublic boolean isTraceEnabled()
isTraceEnabled in class Loggerpublic void removeAllAppenders()
This is useful when re-reading configuration information.
removeAllAppenders in interface AppenderAttachableremoveAllAppenders in class Categorypublic void removeAppender(Appender appender)
removeAppender in interface AppenderAttachableremoveAppender in class Categoryappender - The Appender to remove.public void removeAppender(String name)
removeAppender in interface AppenderAttachableremoveAppender in class Categoryname - The Appender to remove.public void setPriority(Priority priority)
setPriority in class Categorypublic void setResourceBundle(ResourceBundle bundle)
setResourceBundle in class CategoryCopyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.