Package ch.qos.logback.classic
Class Logger
java.lang.Object
ch.qos.logback.classic.Logger
- All Implemented Interfaces:
AppenderAttachable<ILoggingEvent>,Serializable,org.slf4j.Logger,org.slf4j.spi.LocationAwareLogger,org.slf4j.spi.LoggingEventAware
public final class Logger
extends Object
implements org.slf4j.Logger, org.slf4j.spi.LocationAwareLogger, org.slf4j.spi.LoggingEventAware, AppenderAttachable<ILoggingEvent>, Serializable
- See Also:
-
Field Summary
FieldsFields inherited from interface org.slf4j.spi.LocationAwareLogger
DEBUG_INT, ERROR_INT, INFO_INT, TRACE_INT, WARN_INTFields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAppender(Appender<ILoggingEvent> newAppender) voidcallAppenders(ILoggingEvent event) Invoke all the appenders of this logger.voidvoidvoidvoidvoidvoiddebug(org.slf4j.Marker marker, String msg) voiddebug(org.slf4j.Marker marker, String format, Object arg) voiddebug(org.slf4j.Marker marker, String format, Object... argArray) voiddebug(org.slf4j.Marker marker, String format, Object arg1, Object arg2) voiddebug(org.slf4j.Marker marker, String msg, Throwable t) voidRemove all previously added appenders from this logger instance.booleandetachAppender(Appender<ILoggingEvent> appender) Remove the appender passed as parameter form the list of appenders.booleandetachAppender(String name) voidvoidvoidvoidvoidvoiderror(org.slf4j.Marker marker, String msg) voiderror(org.slf4j.Marker marker, String format, Object arg) voiderror(org.slf4j.Marker marker, String format, Object... argArray) voiderror(org.slf4j.Marker marker, String format, Object arg1, Object arg2) voiderror(org.slf4j.Marker marker, String msg, Throwable t) getAppender(String name) getLevel()Return the context for this logger.getName()voidvoidvoidvoidvoidvoidinfo(org.slf4j.Marker marker, String msg) voidinfo(org.slf4j.Marker marker, String format, Object arg) voidinfo(org.slf4j.Marker marker, String format, Object... argArray) voidinfo(org.slf4j.Marker marker, String format, Object arg1, Object arg2) voidinfo(org.slf4j.Marker marker, String msg, Throwable t) booleanbooleanisAttached(Appender<ILoggingEvent> appender) booleanbooleanisDebugEnabled(org.slf4j.Marker marker) booleanisEnabledFor(Level level) booleanisEnabledFor(org.slf4j.Marker marker, Level level) booleanbooleanisErrorEnabled(org.slf4j.Marker marker) booleanbooleanisInfoEnabled(org.slf4j.Marker marker) booleanbooleanisTraceEnabled(org.slf4j.Marker marker) booleanbooleanisWarnEnabled(org.slf4j.Marker marker) voidlog(org.slf4j.event.LoggingEvent slf4jEvent) Support SLF4J interception during initialization as introduced in SLF4J version 1.7.15voidlog(org.slf4j.Marker marker, String fqcn, int levelInt, String message, Object[] argArray, Throwable t) Creates aLoggingEventBuilderof typeDefaultLoggingEventBuilder.protected ObjectAfter serialization, the logger instance does not know its LoggerContext.voidsetAdditive(boolean additive) voidtoString()voidvoidvoidvoidvoidvoidtrace(org.slf4j.Marker marker, String msg) voidtrace(org.slf4j.Marker marker, String format, Object arg) voidtrace(org.slf4j.Marker marker, String format, Object... argArray) voidtrace(org.slf4j.Marker marker, String format, Object arg1, Object arg2) voidtrace(org.slf4j.Marker marker, String msg, Throwable t) voidvoidvoidvoidvoidvoidwarn(org.slf4j.Marker marker, String msg) voidwarn(org.slf4j.Marker marker, String format, Object arg) voidwarn(org.slf4j.Marker marker, String format, Object... argArray) voidwarn(org.slf4j.Marker marker, String format, Object arg1, Object arg2) voidwarn(org.slf4j.Marker marker, String msg, Throwable t) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.slf4j.Logger
atDebug, atError, atInfo, atLevel, atTrace, atWarn, isEnabledForLevel
-
Field Details
-
FQCN
The fully qualified name of this class. Used in gathering caller information.
-
-
Method Details
-
getEffectiveLevel
-
getLevel
-
getName
- Specified by:
getNamein interfaceorg.slf4j.Logger
-
setLevel
-
detachAndStopAllAppenders
public void detachAndStopAllAppenders()Remove all previously added appenders from this logger instance. This is useful when re-reading configuration information.- Specified by:
detachAndStopAllAppendersin interfaceAppenderAttachable<ILoggingEvent>
-
detachAppender
- Specified by:
detachAppenderin interfaceAppenderAttachable<ILoggingEvent>
-
addAppender
- Specified by:
addAppenderin interfaceAppenderAttachable<ILoggingEvent>
-
isAttached
- Specified by:
isAttachedin interfaceAppenderAttachable<ILoggingEvent>
-
iteratorForAppenders
- Specified by:
iteratorForAppendersin interfaceAppenderAttachable<ILoggingEvent>
-
getAppender
- Specified by:
getAppenderin interfaceAppenderAttachable<ILoggingEvent>
-
callAppenders
Invoke all the appenders of this logger.- Parameters:
event- The event to log
-
detachAppender
Remove the appender passed as parameter form the list of appenders.- Specified by:
detachAppenderin interfaceAppenderAttachable<ILoggingEvent>
-
trace
- Specified by:
tracein interfaceorg.slf4j.Logger
-
trace
- Specified by:
tracein interfaceorg.slf4j.Logger
-
trace
- Specified by:
tracein interfaceorg.slf4j.Logger
-
trace
- Specified by:
tracein interfaceorg.slf4j.Logger
-
trace
- Specified by:
tracein interfaceorg.slf4j.Logger
-
trace
- Specified by:
tracein interfaceorg.slf4j.Logger
-
trace
- Specified by:
tracein interfaceorg.slf4j.Logger
-
trace
- Specified by:
tracein interfaceorg.slf4j.Logger
-
trace
- Specified by:
tracein interfaceorg.slf4j.Logger
-
trace
- Specified by:
tracein interfaceorg.slf4j.Logger
-
isDebugEnabled
public boolean isDebugEnabled()- Specified by:
isDebugEnabledin interfaceorg.slf4j.Logger
-
isDebugEnabled
- Specified by:
isDebugEnabledin interfaceorg.slf4j.Logger
-
debug
- Specified by:
debugin interfaceorg.slf4j.Logger
-
debug
- Specified by:
debugin interfaceorg.slf4j.Logger
-
debug
- Specified by:
debugin interfaceorg.slf4j.Logger
-
debug
- Specified by:
debugin interfaceorg.slf4j.Logger
-
debug
- Specified by:
debugin interfaceorg.slf4j.Logger
-
debug
- Specified by:
debugin interfaceorg.slf4j.Logger
-
debug
- Specified by:
debugin interfaceorg.slf4j.Logger
-
debug
- Specified by:
debugin interfaceorg.slf4j.Logger
-
debug
- Specified by:
debugin interfaceorg.slf4j.Logger
-
debug
- Specified by:
debugin interfaceorg.slf4j.Logger
-
error
- Specified by:
errorin interfaceorg.slf4j.Logger
-
error
- Specified by:
errorin interfaceorg.slf4j.Logger
-
error
- Specified by:
errorin interfaceorg.slf4j.Logger
-
error
- Specified by:
errorin interfaceorg.slf4j.Logger
-
error
- Specified by:
errorin interfaceorg.slf4j.Logger
-
error
- Specified by:
errorin interfaceorg.slf4j.Logger
-
error
- Specified by:
errorin interfaceorg.slf4j.Logger
-
error
- Specified by:
errorin interfaceorg.slf4j.Logger
-
error
- Specified by:
errorin interfaceorg.slf4j.Logger
-
error
- Specified by:
errorin interfaceorg.slf4j.Logger
-
isInfoEnabled
public boolean isInfoEnabled()- Specified by:
isInfoEnabledin interfaceorg.slf4j.Logger
-
isInfoEnabled
- Specified by:
isInfoEnabledin interfaceorg.slf4j.Logger
-
info
- Specified by:
infoin interfaceorg.slf4j.Logger
-
info
- Specified by:
infoin interfaceorg.slf4j.Logger
-
info
- Specified by:
infoin interfaceorg.slf4j.Logger
-
info
- Specified by:
infoin interfaceorg.slf4j.Logger
-
info
- Specified by:
infoin interfaceorg.slf4j.Logger
-
info
- Specified by:
infoin interfaceorg.slf4j.Logger
-
info
- Specified by:
infoin interfaceorg.slf4j.Logger
-
info
- Specified by:
infoin interfaceorg.slf4j.Logger
-
info
- Specified by:
infoin interfaceorg.slf4j.Logger
-
info
- Specified by:
infoin interfaceorg.slf4j.Logger
-
isTraceEnabled
public boolean isTraceEnabled()- Specified by:
isTraceEnabledin interfaceorg.slf4j.Logger
-
isTraceEnabled
- Specified by:
isTraceEnabledin interfaceorg.slf4j.Logger
-
isErrorEnabled
public boolean isErrorEnabled()- Specified by:
isErrorEnabledin interfaceorg.slf4j.Logger
-
isErrorEnabled
- Specified by:
isErrorEnabledin interfaceorg.slf4j.Logger
-
isWarnEnabled
public boolean isWarnEnabled()- Specified by:
isWarnEnabledin interfaceorg.slf4j.Logger
-
isWarnEnabled
- Specified by:
isWarnEnabledin interfaceorg.slf4j.Logger
-
isEnabledFor
-
isEnabledFor
-
warn
- Specified by:
warnin interfaceorg.slf4j.Logger
-
warn
- Specified by:
warnin interfaceorg.slf4j.Logger
-
warn
- Specified by:
warnin interfaceorg.slf4j.Logger
-
warn
- Specified by:
warnin interfaceorg.slf4j.Logger
-
warn
- Specified by:
warnin interfaceorg.slf4j.Logger
-
warn
- Specified by:
warnin interfaceorg.slf4j.Logger
-
warn
- Specified by:
warnin interfaceorg.slf4j.Logger
-
warn
- Specified by:
warnin interfaceorg.slf4j.Logger
-
warn
- Specified by:
warnin interfaceorg.slf4j.Logger
-
warn
- Specified by:
warnin interfaceorg.slf4j.Logger
-
isAdditive
public boolean isAdditive() -
setAdditive
public void setAdditive(boolean additive) -
toString
-
getLoggerContext
Return the context for this logger.- Returns:
- the context
-
makeLoggingEventBuilder
Creates aLoggingEventBuilderof typeDefaultLoggingEventBuilder.- Specified by:
makeLoggingEventBuilderin interfaceorg.slf4j.Logger- Since:
- 1.3
-
log
public void log(org.slf4j.Marker marker, String fqcn, int levelInt, String message, Object[] argArray, Throwable t) - Specified by:
login interfaceorg.slf4j.spi.LocationAwareLogger
-
log
Support SLF4J interception during initialization as introduced in SLF4J version 1.7.15- Specified by:
login interfaceorg.slf4j.spi.LoggingEventAware- Parameters:
slf4jEvent-- Since:
- 1.1.4
-
readResolve
After serialization, the logger instance does not know its LoggerContext. The best we can do here, is to return a logger with the same name returned by org.slf4j.LoggerFactory.- Returns:
- Logger instance with the same name
- Throws:
ObjectStreamException
-