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
Fields inherited from interface org.slf4j.spi.LocationAwareLogger
DEBUG_INT, ERROR_INT, INFO_INT, TRACE_INT, WARN_INT
Fields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAppender
(Appender<ILoggingEvent> newAppender) Add an appender.void
callAppenders
(ILoggingEvent event) Invoke all the appenders of this logger.void
void
void
void
void
void
void
void
void
void
void
Remove all previously added appenders from this logger instance.boolean
detachAppender
(Appender<ILoggingEvent> appender) Remove the appender passed as parameter form the list of appenders.boolean
detachAppender
(String name) Detach the appender with the name passed as parameter from the list of appenders.void
void
void
void
void
void
void
void
void
void
getAppender
(String name) Get an appender by name.getLevel()
Return the context for this logger.getName()
void
void
void
void
void
void
void
void
void
void
boolean
boolean
isAttached
(Appender<ILoggingEvent> appender) Returnstrue
if the specified appender is in list of attached,false
otherwise.boolean
boolean
isDebugEnabled
(org.slf4j.Marker marker) boolean
isEnabledFor
(Level level) boolean
isEnabledFor
(org.slf4j.Marker marker, Level level) boolean
boolean
isErrorEnabled
(org.slf4j.Marker marker) boolean
boolean
isInfoEnabled
(org.slf4j.Marker marker) boolean
boolean
isTraceEnabled
(org.slf4j.Marker marker) boolean
boolean
isWarnEnabled
(org.slf4j.Marker marker) Get an iterator for appenders contained in the parent object.void
log
(org.slf4j.event.LoggingEvent slf4jEvent) Support SLF4J interception during initialization as introduced in SLF4J version 1.7.15void
log
(org.slf4j.Marker marker, String fqcn, int levelInt, String message, Object[] argArray, Throwable t) org.slf4j.spi.LoggingEventBuilder
makeLoggingEventBuilder
(org.slf4j.event.Level level) Creates aLoggingEventBuilder
of typeDefaultLoggingEventBuilder
.protected Object
After serialization, the logger instance does not know its LoggerContext.void
setAdditive
(boolean additive) void
toString()
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
getName
in interfaceorg.slf4j.Logger
-
setLevel
-
detachAndStopAllAppenders
Remove all previously added appenders from this logger instance. This is useful when re-reading configuration information.- Specified by:
detachAndStopAllAppenders
in interfaceAppenderAttachable<ILoggingEvent>
-
detachAppender
Description copied from interface:AppenderAttachable
Detach the appender with the name passed as parameter from the list of appenders.- Specified by:
detachAppender
in interfaceAppenderAttachable<ILoggingEvent>
-
addAppender
Description copied from interface:AppenderAttachable
Add an appender.- Specified by:
addAppender
in interfaceAppenderAttachable<ILoggingEvent>
-
isAttached
Description copied from interface:AppenderAttachable
Returnstrue
if the specified appender is in list of attached,false
otherwise.- Specified by:
isAttached
in interfaceAppenderAttachable<ILoggingEvent>
-
iteratorForAppenders
Description copied from interface:AppenderAttachable
Get an iterator for appenders contained in the parent object.- Specified by:
iteratorForAppenders
in interfaceAppenderAttachable<ILoggingEvent>
-
getAppender
Description copied from interface:AppenderAttachable
Get an appender by name.- Specified by:
getAppender
in 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:
detachAppender
in interfaceAppenderAttachable<ILoggingEvent>
-
trace
- Specified by:
trace
in interfaceorg.slf4j.Logger
-
trace
- Specified by:
trace
in interfaceorg.slf4j.Logger
-
trace
- Specified by:
trace
in interfaceorg.slf4j.Logger
-
trace
- Specified by:
trace
in interfaceorg.slf4j.Logger
-
trace
- Specified by:
trace
in interfaceorg.slf4j.Logger
-
trace
- Specified by:
trace
in interfaceorg.slf4j.Logger
-
trace
- Specified by:
trace
in interfaceorg.slf4j.Logger
-
trace
- Specified by:
trace
in interfaceorg.slf4j.Logger
-
trace
- Specified by:
trace
in interfaceorg.slf4j.Logger
-
trace
- Specified by:
trace
in interfaceorg.slf4j.Logger
-
isDebugEnabled
- Specified by:
isDebugEnabled
in interfaceorg.slf4j.Logger
-
isDebugEnabled
- Specified by:
isDebugEnabled
in interfaceorg.slf4j.Logger
-
debug
- Specified by:
debug
in interfaceorg.slf4j.Logger
-
debug
- Specified by:
debug
in interfaceorg.slf4j.Logger
-
debug
- Specified by:
debug
in interfaceorg.slf4j.Logger
-
debug
- Specified by:
debug
in interfaceorg.slf4j.Logger
-
debug
- Specified by:
debug
in interfaceorg.slf4j.Logger
-
debug
- Specified by:
debug
in interfaceorg.slf4j.Logger
-
debug
- Specified by:
debug
in interfaceorg.slf4j.Logger
-
debug
- Specified by:
debug
in interfaceorg.slf4j.Logger
-
debug
- Specified by:
debug
in interfaceorg.slf4j.Logger
-
debug
- Specified by:
debug
in interfaceorg.slf4j.Logger
-
error
- Specified by:
error
in interfaceorg.slf4j.Logger
-
error
- Specified by:
error
in interfaceorg.slf4j.Logger
-
error
- Specified by:
error
in interfaceorg.slf4j.Logger
-
error
- Specified by:
error
in interfaceorg.slf4j.Logger
-
error
- Specified by:
error
in interfaceorg.slf4j.Logger
-
error
- Specified by:
error
in interfaceorg.slf4j.Logger
-
error
- Specified by:
error
in interfaceorg.slf4j.Logger
-
error
- Specified by:
error
in interfaceorg.slf4j.Logger
-
error
- Specified by:
error
in interfaceorg.slf4j.Logger
-
error
- Specified by:
error
in interfaceorg.slf4j.Logger
-
isInfoEnabled
- Specified by:
isInfoEnabled
in interfaceorg.slf4j.Logger
-
isInfoEnabled
- Specified by:
isInfoEnabled
in interfaceorg.slf4j.Logger
-
info
- Specified by:
info
in interfaceorg.slf4j.Logger
-
info
- Specified by:
info
in interfaceorg.slf4j.Logger
-
info
- Specified by:
info
in interfaceorg.slf4j.Logger
-
info
- Specified by:
info
in interfaceorg.slf4j.Logger
-
info
- Specified by:
info
in interfaceorg.slf4j.Logger
-
info
- Specified by:
info
in interfaceorg.slf4j.Logger
-
info
- Specified by:
info
in interfaceorg.slf4j.Logger
-
info
- Specified by:
info
in interfaceorg.slf4j.Logger
-
info
- Specified by:
info
in interfaceorg.slf4j.Logger
-
info
- Specified by:
info
in interfaceorg.slf4j.Logger
-
isTraceEnabled
- Specified by:
isTraceEnabled
in interfaceorg.slf4j.Logger
-
isTraceEnabled
- Specified by:
isTraceEnabled
in interfaceorg.slf4j.Logger
-
isErrorEnabled
- Specified by:
isErrorEnabled
in interfaceorg.slf4j.Logger
-
isErrorEnabled
- Specified by:
isErrorEnabled
in interfaceorg.slf4j.Logger
-
isWarnEnabled
- Specified by:
isWarnEnabled
in interfaceorg.slf4j.Logger
-
isWarnEnabled
- Specified by:
isWarnEnabled
in interfaceorg.slf4j.Logger
-
isEnabledFor
-
isEnabledFor
-
warn
- Specified by:
warn
in interfaceorg.slf4j.Logger
-
warn
- Specified by:
warn
in interfaceorg.slf4j.Logger
-
warn
- Specified by:
warn
in interfaceorg.slf4j.Logger
-
warn
- Specified by:
warn
in interfaceorg.slf4j.Logger
-
warn
- Specified by:
warn
in interfaceorg.slf4j.Logger
-
warn
- Specified by:
warn
in interfaceorg.slf4j.Logger
-
warn
- Specified by:
warn
in interfaceorg.slf4j.Logger
-
warn
- Specified by:
warn
in interfaceorg.slf4j.Logger
-
warn
- Specified by:
warn
in interfaceorg.slf4j.Logger
-
warn
- Specified by:
warn
in interfaceorg.slf4j.Logger
-
isAdditive
-
setAdditive
-
toString
-
getLoggerContext
Return the context for this logger.- Returns:
- the context
-
makeLoggingEventBuilder
Creates aLoggingEventBuilder
of typeDefaultLoggingEventBuilder
.- Specified by:
makeLoggingEventBuilder
in 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:
log
in interfaceorg.slf4j.spi.LocationAwareLogger
-
log
Support SLF4J interception during initialization as introduced in SLF4J version 1.7.15- Specified by:
log
in 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
-