|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.logging.log4j.spi.AbstractLogger
org.apache.logging.log4j.core.Logger
public class Logger
Nested Class Summary | |
---|---|
protected class |
Logger.PrivateConfig
The binding between a Logger and its configuration. |
Field Summary | |
---|---|
protected Logger.PrivateConfig |
config
config should be consistent across threads. |
Fields inherited from class org.apache.logging.log4j.spi.AbstractLogger |
---|
CATCHING_MARKER, ENTRY_MARKER, EXCEPTION_MARKER, EXIT_MARKER, FLOW_MARKER, THROWING_MARKER |
Constructor Summary | |
---|---|
protected |
Logger(LoggerContext context,
String name)
The constructor. |
Method Summary | |
---|---|
void |
addAppender(Appender appender)
This method is not exposed through the public API and is used primarily for unit testing. |
void |
addFilter(Filter filter)
This method is not exposed through the public API and is used primarily for unit testing. |
int |
filterCount()
This method is not exposed through the public API and is used primarily for unit testing. |
Map<String,Appender> |
getAppenders()
This method is not exposed through the public API and is used primarily for unit testing. |
LoggerContext |
getContext()
Returns the LoggerContext this Logger is associated with. |
Iterator<Filter> |
getFilters()
This method is not exposed through the public API and is used primarily for unit testing. |
org.apache.logging.log4j.Level |
getLevel()
Returns the Level associated with the Logger. |
Logger |
getParent()
Returns the parent of this Logger. |
boolean |
isAdditive()
This method is not exposed through the public API and is present only to support the Log4j 1.2 compatibility bridge. |
boolean |
isEnabled(org.apache.logging.log4j.Level level,
org.apache.logging.log4j.Marker marker,
org.apache.logging.log4j.message.Message msg,
Throwable t)
|
boolean |
isEnabled(org.apache.logging.log4j.Level level,
org.apache.logging.log4j.Marker marker,
Object msg,
Throwable t)
|
boolean |
isEnabled(org.apache.logging.log4j.Level level,
org.apache.logging.log4j.Marker marker,
String msg)
|
boolean |
isEnabled(org.apache.logging.log4j.Level level,
org.apache.logging.log4j.Marker marker,
String msg,
Object... p1)
|
boolean |
isEnabled(org.apache.logging.log4j.Level level,
org.apache.logging.log4j.Marker marker,
String msg,
Throwable t)
|
void |
log(org.apache.logging.log4j.Marker marker,
String fqcn,
org.apache.logging.log4j.Level level,
org.apache.logging.log4j.message.Message data,
Throwable t)
|
void |
removeAppender(Appender appender)
This method is not exposed through the public API and is used primarily for unit testing. |
void |
setAdditive(boolean additive)
This method is not exposed through the public API and is present only to support the Log4j 1.2 compatibility bridge. |
void |
setLevel(org.apache.logging.log4j.Level level)
This method is not exposed through the public API and is provided primarily for unit testing. |
String |
toString()
Returns a String representation of this instance in the form "name:level[ in context_name]" . |
Methods inherited from class org.apache.logging.log4j.spi.AbstractLogger |
---|
catching, catching, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, entry, entry, error, error, error, error, error, error, error, error, error, error, error, error, error, error, exit, exit, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, getName, info, info, info, info, info, info, info, info, info, info, info, info, info, info, isDebugEnabled, isDebugEnabled, isEnabled, isErrorEnabled, isErrorEnabled, isFatalEnabled, isFatalEnabled, isInfoEnabled, isInfoEnabled, isTraceEnabled, isTraceEnabled, isWarnEnabled, isWarnEnabled, throwing, throwing, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected volatile Logger.PrivateConfig config
Constructor Detail |
---|
protected Logger(LoggerContext context, String name)
context
- The LoggerContext this Logger is associated with.name
- The name of the Logger.Method Detail |
---|
public Logger getParent()
public LoggerContext getContext()
public void setLevel(org.apache.logging.log4j.Level level)
level
- The Level to use on this Logger.public org.apache.logging.log4j.Level getLevel()
public void log(org.apache.logging.log4j.Marker marker, String fqcn, org.apache.logging.log4j.Level level, org.apache.logging.log4j.message.Message data, Throwable t)
log
in class org.apache.logging.log4j.spi.AbstractLogger
public boolean isEnabled(org.apache.logging.log4j.Level level, org.apache.logging.log4j.Marker marker, String msg)
isEnabled
in class org.apache.logging.log4j.spi.AbstractLogger
public boolean isEnabled(org.apache.logging.log4j.Level level, org.apache.logging.log4j.Marker marker, String msg, Throwable t)
isEnabled
in class org.apache.logging.log4j.spi.AbstractLogger
public boolean isEnabled(org.apache.logging.log4j.Level level, org.apache.logging.log4j.Marker marker, String msg, Object... p1)
isEnabled
in class org.apache.logging.log4j.spi.AbstractLogger
public boolean isEnabled(org.apache.logging.log4j.Level level, org.apache.logging.log4j.Marker marker, Object msg, Throwable t)
isEnabled
in class org.apache.logging.log4j.spi.AbstractLogger
public boolean isEnabled(org.apache.logging.log4j.Level level, org.apache.logging.log4j.Marker marker, org.apache.logging.log4j.message.Message msg, Throwable t)
isEnabled
in class org.apache.logging.log4j.spi.AbstractLogger
public void addAppender(Appender appender)
appender
- The Appender to add to the Logger.public void removeAppender(Appender appender)
appender
- The Appender to remove from the Logger.public Map<String,Appender> getAppenders()
public Iterator<Filter> getFilters()
public int filterCount()
public void addFilter(Filter filter)
filter
- The Filter to add.public boolean isAdditive()
public void setAdditive(boolean additive)
additive
- Boolean value to indicate whether the Logger is additive or not.public String toString()
"name:level[ in context_name]"
.
toString
in class org.apache.logging.log4j.spi.AbstractLogger
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |