ch.qos.logback.classic

## Class Logger

- java.lang.Object
- - ch.qos.logback.classic.Logger

All Implemented Interfaces:
  AppenderAttachable<ILoggingEvent>, java.io.Serializable, org.slf4j.Logger, org.slf4j.spi.LocationAwareLogger

    public final class Logger
    extends java.lang.Object
    implements org.slf4j.Logger, org.slf4j.spi.LocationAwareLogger, AppenderAttachable<ILoggingEvent>, java.io.Serializable

See Also:
  Serialized Form

### Field Summary

Fields
`static java.lang.String` `FQCN` The fully qualified name of this class.

### 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

Methods
`void` `addAppender(Appender<ILoggingEvent> newAppender)` Add an appender.
`void` `callAppenders(ILoggingEvent event)` Invoke all the appenders of this logger.
`void` `debug(org.slf4j.Marker marker, java.lang.String msg)`
`void` `debug(org.slf4j.Marker marker, java.lang.String format, java.lang.Object arg)`
`void` `debug(org.slf4j.Marker marker, java.lang.String format, java.lang.Object[] argArray)`
`void` `debug(org.slf4j.Marker marker, java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`
`void` `debug(org.slf4j.Marker marker, java.lang.String msg, java.lang.Throwable t)`
`void` `debug(java.lang.String msg)`
`void` `debug(java.lang.String format, java.lang.Object arg)`
`void` `debug(java.lang.String format, java.lang.Object[] argArray)`
`void` `debug(java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`
`void` `debug(java.lang.String msg, java.lang.Throwable t)`
`void` `detachAndStopAllAppenders()` 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(java.lang.String name)` Detach the appender with the name passed as parameter from the list of appenders.
`void` `error(org.slf4j.Marker marker, java.lang.String msg)`
`void` `error(org.slf4j.Marker marker, java.lang.String format, java.lang.Object arg)`
`void` `error(org.slf4j.Marker marker, java.lang.String format, java.lang.Object[] argArray)`
`void` `error(org.slf4j.Marker marker, java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`
`void` `error(org.slf4j.Marker marker, java.lang.String msg, java.lang.Throwable t)`
`void` `error(java.lang.String msg)`
`void` `error(java.lang.String format, java.lang.Object arg)`
`void` `error(java.lang.String format, java.lang.Object[] argArray)`
`void` `error(java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`
`void` `error(java.lang.String msg, java.lang.Throwable t)`
`Appender<ILoggingEvent>` `getAppender(java.lang.String name)` Get an appender by name.
`Level` `getEffectiveLevel()`
`Level` `getLevel()`
`LoggerContext` `getLoggerContext()` Return the context for this logger.
`java.lang.String` `getName()`
`void` `info(org.slf4j.Marker marker, java.lang.String msg)`
`void` `info(org.slf4j.Marker marker, java.lang.String format, java.lang.Object arg)`
`void` `info(org.slf4j.Marker marker, java.lang.String format, java.lang.Object[] argArray)`
`void` `info(org.slf4j.Marker marker, java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`
`void` `info(org.slf4j.Marker marker, java.lang.String msg, java.lang.Throwable t)`
`void` `info(java.lang.String msg)`
`void` `info(java.lang.String format, java.lang.Object arg)`
`void` `info(java.lang.String format, java.lang.Object[] argArray)`
`void` `info(java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`
`void` `info(java.lang.String msg, java.lang.Throwable t)`
`boolean` `isAdditive()`
`boolean` `isAttached(Appender<ILoggingEvent> appender)` Returns `true` if the specified appender is in list of attached attached, `false` otherwise.
`boolean` `isDebugEnabled()`
`boolean` `isDebugEnabled(org.slf4j.Marker marker)`
`boolean` `isEnabledFor(Level level)`
`boolean` `isEnabledFor(org.slf4j.Marker marker, Level level)`
`boolean` `isErrorEnabled()`
`boolean` `isErrorEnabled(org.slf4j.Marker marker)`
`boolean` `isInfoEnabled()`
`boolean` `isInfoEnabled(org.slf4j.Marker marker)`
`boolean` `isTraceEnabled()`
`boolean` `isTraceEnabled(org.slf4j.Marker marker)`
`boolean` `isWarnEnabled()`
`boolean` `isWarnEnabled(org.slf4j.Marker marker)`
`java.util.Iterator<Appender<ILoggingEvent>>` `iteratorForAppenders()` Get an iterator for appenders contained in the parent object.
`void` `log(org.slf4j.Marker marker, java.lang.String fqcn, int levelInt, java.lang.String message, java.lang.Object[] argArray, java.lang.Throwable t)`
`protected java.lang.Object` `readResolve()` After serialization, the logger instance does not know its LoggerContext.
`void` `setAdditive(boolean additive)`
`void` `setLevel(Level newLevel)`
`java.lang.String` `toString()`
`void` `trace(org.slf4j.Marker marker, java.lang.String msg)`
`void` `trace(org.slf4j.Marker marker, java.lang.String format, java.lang.Object arg)`
`void` `trace(org.slf4j.Marker marker, java.lang.String format, java.lang.Object[] argArray)`
`void` `trace(org.slf4j.Marker marker, java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`
`void` `trace(org.slf4j.Marker marker, java.lang.String msg, java.lang.Throwable t)`
`void` `trace(java.lang.String msg)`
`void` `trace(java.lang.String format, java.lang.Object arg)`
`void` `trace(java.lang.String format, java.lang.Object[] argArray)`
`void` `trace(java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`
`void` `trace(java.lang.String msg, java.lang.Throwable t)`
`void` `warn(org.slf4j.Marker marker, java.lang.String msg)`
`void` `warn(org.slf4j.Marker marker, java.lang.String format, java.lang.Object arg)`
`void` `warn(org.slf4j.Marker marker, java.lang.String format, java.lang.Object[] argArray)`
`void` `warn(org.slf4j.Marker marker, java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`
`void` `warn(org.slf4j.Marker marker, java.lang.String msg, java.lang.Throwable t)`
`void` `warn(java.lang.String msg)`
`void` `warn(java.lang.String format, java.lang.Object arg)`
`void` `warn(java.lang.String format, java.lang.Object[] argArray)`
`void` `warn(java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`
`void` `warn(java.lang.String msg, java.lang.Throwable t)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### FQCN

    public static final java.lang.String FQCN

The fully qualified name of this class. Used in gathering caller information.

### Method Detail

#### getEffectiveLevel

    public Level getEffectiveLevel()

#### getLevel

    public Level getLevel()

#### getName

    public java.lang.String getName()

Specified by:
  `getName` in interface `org.slf4j.Logger`

#### setLevel

    public void setLevel(Level newLevel)

#### detachAndStopAllAppenders

    public void detachAndStopAllAppenders()

Remove all previously added appenders from this logger instance.

This is useful when re-reading configuration information.

Specified by:
  `detachAndStopAllAppenders` in interface `AppenderAttachable<ILoggingEvent>`

#### detachAppender

    public boolean detachAppender(java.lang.String name)

Description copied from interface: `AppenderAttachable`
Detach the appender with the name passed as parameter from the list of appenders.

Specified by:
  `detachAppender` in interface `AppenderAttachable<ILoggingEvent>`

#### addAppender

    public void addAppender(Appender<ILoggingEvent> newAppender)

Description copied from interface: `AppenderAttachable`
Add an appender.

Specified by:
  `addAppender` in interface `AppenderAttachable<ILoggingEvent>`

#### isAttached

    public boolean isAttached(Appender<ILoggingEvent> appender)

Description copied from interface: `AppenderAttachable`
Returns `true` if the specified appender is in list of attached attached, `false` otherwise.

Specified by:
  `isAttached` in interface `AppenderAttachable<ILoggingEvent>`

#### iteratorForAppenders

    public java.util.Iterator<Appender<ILoggingEvent>> iteratorForAppenders()

Description copied from interface: `AppenderAttachable`
Get an iterator for appenders contained in the parent object.

Specified by:
  `iteratorForAppenders` in interface `AppenderAttachable<ILoggingEvent>`

#### getAppender

    public Appender<ILoggingEvent> getAppender(java.lang.String name)

Description copied from interface: `AppenderAttachable`
Get an appender by name.

Specified by:
  `getAppender` in interface `AppenderAttachable<ILoggingEvent>`

#### callAppenders

    public void callAppenders(ILoggingEvent event)

Invoke all the appenders of this logger.

Parameters:
  `event` - The event to log

#### detachAppender

    public boolean detachAppender(Appender<ILoggingEvent> appender)

Remove the appender passed as parameter form the list of appenders.

Specified by:
  `detachAppender` in interface `AppenderAttachable<ILoggingEvent>`

#### trace

    public void trace(java.lang.String msg)

Specified by:
  `trace` in interface `org.slf4j.Logger`

#### trace

    public void trace(java.lang.String format,
             java.lang.Object arg)

Specified by:
  `trace` in interface `org.slf4j.Logger`

#### trace

    public void trace(java.lang.String format,
             java.lang.Object arg1,
             java.lang.Object arg2)

Specified by:
  `trace` in interface `org.slf4j.Logger`

#### trace

    public void trace(java.lang.String format,
             java.lang.Object[] argArray)

Specified by:
  `trace` in interface `org.slf4j.Logger`

#### trace

    public void trace(java.lang.String msg,
             java.lang.Throwable t)

Specified by:
  `trace` in interface `org.slf4j.Logger`

#### trace

    public void trace(org.slf4j.Marker marker,
             java.lang.String msg)

Specified by:
  `trace` in interface `org.slf4j.Logger`

#### trace

    public void trace(org.slf4j.Marker marker,
             java.lang.String format,
             java.lang.Object arg)

Specified by:
  `trace` in interface `org.slf4j.Logger`

#### trace

    public void trace(org.slf4j.Marker marker,
             java.lang.String format,
             java.lang.Object arg1,
             java.lang.Object arg2)

Specified by:
  `trace` in interface `org.slf4j.Logger`

#### trace

    public void trace(org.slf4j.Marker marker,
             java.lang.String format,
             java.lang.Object[] argArray)

Specified by:
  `trace` in interface `org.slf4j.Logger`

#### trace

    public void trace(org.slf4j.Marker marker,
             java.lang.String msg,
             java.lang.Throwable t)

Specified by:
  `trace` in interface `org.slf4j.Logger`

#### isDebugEnabled

    public boolean isDebugEnabled()

Specified by:
  `isDebugEnabled` in interface `org.slf4j.Logger`

#### isDebugEnabled

    public boolean isDebugEnabled(org.slf4j.Marker marker)

Specified by:
  `isDebugEnabled` in interface `org.slf4j.Logger`

#### debug

    public void debug(java.lang.String msg)

Specified by:
  `debug` in interface `org.slf4j.Logger`

#### debug

    public void debug(java.lang.String format,
             java.lang.Object arg)

Specified by:
  `debug` in interface `org.slf4j.Logger`

#### debug

    public void debug(java.lang.String format,
             java.lang.Object arg1,
             java.lang.Object arg2)

Specified by:
  `debug` in interface `org.slf4j.Logger`

#### debug

    public void debug(java.lang.String format,
             java.lang.Object[] argArray)

Specified by:
  `debug` in interface `org.slf4j.Logger`

#### debug

    public void debug(java.lang.String msg,
             java.lang.Throwable t)

Specified by:
  `debug` in interface `org.slf4j.Logger`

#### debug

    public void debug(org.slf4j.Marker marker,
             java.lang.String msg)

Specified by:
  `debug` in interface `org.slf4j.Logger`

#### debug

    public void debug(org.slf4j.Marker marker,
             java.lang.String format,
             java.lang.Object arg)

Specified by:
  `debug` in interface `org.slf4j.Logger`

#### debug

    public void debug(org.slf4j.Marker marker,
             java.lang.String format,
             java.lang.Object arg1,
             java.lang.Object arg2)

Specified by:
  `debug` in interface `org.slf4j.Logger`

#### debug

    public void debug(org.slf4j.Marker marker,
             java.lang.String format,
             java.lang.Object[] argArray)

Specified by:
  `debug` in interface `org.slf4j.Logger`

#### debug

    public void debug(org.slf4j.Marker marker,
             java.lang.String msg,
             java.lang.Throwable t)

Specified by:
  `debug` in interface `org.slf4j.Logger`

#### error

    public void error(java.lang.String msg)

Specified by:
  `error` in interface `org.slf4j.Logger`

#### error

    public void error(java.lang.String format,
             java.lang.Object arg)

Specified by:
  `error` in interface `org.slf4j.Logger`

#### error

    public void error(java.lang.String format,
             java.lang.Object arg1,
             java.lang.Object arg2)

Specified by:
  `error` in interface `org.slf4j.Logger`

#### error

    public void error(java.lang.String format,
             java.lang.Object[] argArray)

Specified by:
  `error` in interface `org.slf4j.Logger`

#### error

    public void error(java.lang.String msg,
             java.lang.Throwable t)

Specified by:
  `error` in interface `org.slf4j.Logger`

#### error

    public void error(org.slf4j.Marker marker,
             java.lang.String msg)

Specified by:
  `error` in interface `org.slf4j.Logger`

#### error

    public void error(org.slf4j.Marker marker,
             java.lang.String format,
             java.lang.Object arg)

Specified by:
  `error` in interface `org.slf4j.Logger`

#### error

    public void error(org.slf4j.Marker marker,
             java.lang.String format,
             java.lang.Object arg1,
             java.lang.Object arg2)

Specified by:
  `error` in interface `org.slf4j.Logger`

#### error

    public void error(org.slf4j.Marker marker,
             java.lang.String format,
             java.lang.Object[] argArray)

Specified by:
  `error` in interface `org.slf4j.Logger`

#### error

    public void error(org.slf4j.Marker marker,
             java.lang.String msg,
             java.lang.Throwable t)

Specified by:
  `error` in interface `org.slf4j.Logger`

#### isInfoEnabled

    public boolean isInfoEnabled()

Specified by:
  `isInfoEnabled` in interface `org.slf4j.Logger`

#### isInfoEnabled

    public boolean isInfoEnabled(org.slf4j.Marker marker)

Specified by:
  `isInfoEnabled` in interface `org.slf4j.Logger`

#### info

    public void info(java.lang.String msg)

Specified by:
  `info` in interface `org.slf4j.Logger`

#### info

    public void info(java.lang.String format,
            java.lang.Object arg)

Specified by:
  `info` in interface `org.slf4j.Logger`

#### info

    public void info(java.lang.String format,
            java.lang.Object arg1,
            java.lang.Object arg2)

Specified by:
  `info` in interface `org.slf4j.Logger`

#### info

    public void info(java.lang.String format,
            java.lang.Object[] argArray)

Specified by:
  `info` in interface `org.slf4j.Logger`

#### info

    public void info(java.lang.String msg,
            java.lang.Throwable t)

Specified by:
  `info` in interface `org.slf4j.Logger`

#### info

    public void info(org.slf4j.Marker marker,
            java.lang.String msg)

Specified by:
  `info` in interface `org.slf4j.Logger`

#### info

    public void info(org.slf4j.Marker marker,
            java.lang.String format,
            java.lang.Object arg)

Specified by:
  `info` in interface `org.slf4j.Logger`

#### info

    public void info(org.slf4j.Marker marker,
            java.lang.String format,
            java.lang.Object arg1,
            java.lang.Object arg2)

Specified by:
  `info` in interface `org.slf4j.Logger`

#### info

    public void info(org.slf4j.Marker marker,
            java.lang.String format,
            java.lang.Object[] argArray)

Specified by:
  `info` in interface `org.slf4j.Logger`

#### info

    public void info(org.slf4j.Marker marker,
            java.lang.String msg,
            java.lang.Throwable t)

Specified by:
  `info` in interface `org.slf4j.Logger`

#### isTraceEnabled

    public boolean isTraceEnabled()

Specified by:
  `isTraceEnabled` in interface `org.slf4j.Logger`

#### isTraceEnabled

    public boolean isTraceEnabled(org.slf4j.Marker marker)

Specified by:
  `isTraceEnabled` in interface `org.slf4j.Logger`

#### isErrorEnabled

    public boolean isErrorEnabled()

Specified by:
  `isErrorEnabled` in interface `org.slf4j.Logger`

#### isErrorEnabled

    public boolean isErrorEnabled(org.slf4j.Marker marker)

Specified by:
  `isErrorEnabled` in interface `org.slf4j.Logger`

#### isWarnEnabled

    public boolean isWarnEnabled()

Specified by:
  `isWarnEnabled` in interface `org.slf4j.Logger`

#### isWarnEnabled

    public boolean isWarnEnabled(org.slf4j.Marker marker)

Specified by:
  `isWarnEnabled` in interface `org.slf4j.Logger`

#### isEnabledFor

    public boolean isEnabledFor(org.slf4j.Marker marker,
                       Level level)

#### isEnabledFor

    public boolean isEnabledFor(Level level)

#### warn

    public void warn(java.lang.String msg)

Specified by:
  `warn` in interface `org.slf4j.Logger`

#### warn

    public void warn(java.lang.String msg,
            java.lang.Throwable t)

Specified by:
  `warn` in interface `org.slf4j.Logger`

#### warn

    public void warn(java.lang.String format,
            java.lang.Object arg)

Specified by:
  `warn` in interface `org.slf4j.Logger`

#### warn

    public void warn(java.lang.String format,
            java.lang.Object arg1,
            java.lang.Object arg2)

Specified by:
  `warn` in interface `org.slf4j.Logger`

#### warn

    public void warn(java.lang.String format,
            java.lang.Object[] argArray)

Specified by:
  `warn` in interface `org.slf4j.Logger`

#### warn

    public void warn(org.slf4j.Marker marker,
            java.lang.String msg)

Specified by:
  `warn` in interface `org.slf4j.Logger`

#### warn

    public void warn(org.slf4j.Marker marker,
            java.lang.String format,
            java.lang.Object arg)

Specified by:
  `warn` in interface `org.slf4j.Logger`

#### warn

    public void warn(org.slf4j.Marker marker,
            java.lang.String format,
            java.lang.Object[] argArray)

Specified by:
  `warn` in interface `org.slf4j.Logger`

#### warn

    public void warn(org.slf4j.Marker marker,
            java.lang.String format,
            java.lang.Object arg1,
            java.lang.Object arg2)

Specified by:
  `warn` in interface `org.slf4j.Logger`

#### warn

    public void warn(org.slf4j.Marker marker,
            java.lang.String msg,
            java.lang.Throwable t)

Specified by:
  `warn` in interface `org.slf4j.Logger`

#### isAdditive

    public boolean isAdditive()

#### setAdditive

    public void setAdditive(boolean additive)

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### getLoggerContext

    public LoggerContext getLoggerContext()

Return the context for this logger.

Returns:
  the context

#### log

    public void log(org.slf4j.Marker marker,
           java.lang.String fqcn,
           int levelInt,
           java.lang.String message,
           java.lang.Object[] argArray,
           java.lang.Throwable t)

Specified by:
  `log` in interface `org.slf4j.spi.LocationAwareLogger`

#### readResolve

    protected java.lang.Object readResolve()
                                    throws java.io.ObjectStreamException

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:
  `java.io.ObjectStreamException`