com.mysql.cj.log

## Class Slf4JLogger

- java.lang.Object
- - com.mysql.cj.log.Slf4JLogger

All Implemented Interfaces:
  Log

    public class Slf4JLogger
    extends Object
    implements Log

### Field Summary

Fields
`private org.slf4j.Logger` `log`

### Fields inherited from interface com.mysql.cj.log.Log

`LOGGER_INSTANCE_NAME`

### Constructor Summary

Constructors
`Slf4JLogger(String name)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `isDebugEnabled()` Is the 'debug' log level enabled?
`boolean` `isErrorEnabled()` Is the 'error' log level enabled?
`boolean` `isFatalEnabled()` Is the 'fatal' log level enabled?
`boolean` `isInfoEnabled()` Is the 'info' log level enabled?
`boolean` `isTraceEnabled()` Is the 'trace' log level enabled?
`boolean` `isWarnEnabled()` Is the 'warn' log level enabled?
`void` `logDebug(Object msg)` Logs the given message instance using the 'debug' level
`void` `logDebug(Object msg, Throwable thrown)` Logs the given message and Throwable at the 'debug' level.
`void` `logError(Object msg)` Logs the given message instance using the 'error' level
`void` `logError(Object msg, Throwable thrown)` Logs the given message and Throwable at the 'error' level.
`void` `logFatal(Object msg)` Logs the given message instance using the 'fatal' level
`void` `logFatal(Object msg, Throwable thrown)` Logs the given message and Throwable at the 'fatal' level.
`void` `logInfo(Object msg)` Logs the given message instance using the 'info' level
`void` `logInfo(Object msg, Throwable thrown)` Logs the given message and Throwable at the 'info' level.
`void` `logTrace(Object msg)` Logs the given message instance using the 'trace' level
`void` `logTrace(Object msg, Throwable thrown)` Logs the given message and Throwable at the 'trace' level.
`void` `logWarn(Object msg)` Logs the given message instance using the 'warn' level
`void` `logWarn(Object msg, Throwable thrown)` Logs the given message and Throwable at the 'warn' level.

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

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

### Field Detail

#### log

    private org.slf4j.Logger log

### Constructor Detail

#### Slf4JLogger

    public Slf4JLogger(String name)

### Method Detail

#### isDebugEnabled

    public boolean isDebugEnabled()

Description copied from interface: `Log`
Is the 'debug' log level enabled?

Specified by:
  `isDebugEnabled` in interface `Log`
Returns:
  true if so.

#### isErrorEnabled

    public boolean isErrorEnabled()

Description copied from interface: `Log`
Is the 'error' log level enabled?

Specified by:
  `isErrorEnabled` in interface `Log`
Returns:
  true if so.

#### isFatalEnabled

    public boolean isFatalEnabled()

Description copied from interface: `Log`
Is the 'fatal' log level enabled?

Specified by:
  `isFatalEnabled` in interface `Log`
Returns:
  true if so.

#### isInfoEnabled

    public boolean isInfoEnabled()

Description copied from interface: `Log`
Is the 'info' log level enabled?

Specified by:
  `isInfoEnabled` in interface `Log`
Returns:
  true if so.

#### isTraceEnabled

    public boolean isTraceEnabled()

Description copied from interface: `Log`
Is the 'trace' log level enabled?

Specified by:
  `isTraceEnabled` in interface `Log`
Returns:
  true if so.

#### isWarnEnabled

    public boolean isWarnEnabled()

Description copied from interface: `Log`
Is the 'warn' log level enabled?

Specified by:
  `isWarnEnabled` in interface `Log`
Returns:
  true if so.

#### logDebug

    public void logDebug(Object msg)

Description copied from interface: `Log`
Logs the given message instance using the 'debug' level

Specified by:
  `logDebug` in interface `Log`
Parameters:
  `msg` - the message to log

#### logDebug

    public void logDebug(Object msg,
                         Throwable thrown)

Description copied from interface: `Log`
Logs the given message and Throwable at the 'debug' level.

Specified by:
  `logDebug` in interface `Log`
Parameters:
  `msg` - the message to log
  `thrown` - the throwable to log (may be null)

#### logError

    public void logError(Object msg)

Description copied from interface: `Log`
Logs the given message instance using the 'error' level

Specified by:
  `logError` in interface `Log`
Parameters:
  `msg` - the message to log

#### logError

    public void logError(Object msg,
                         Throwable thrown)

Description copied from interface: `Log`
Logs the given message and Throwable at the 'error' level.

Specified by:
  `logError` in interface `Log`
Parameters:
  `msg` - the message to log
  `thrown` - the throwable to log (may be null)

#### logFatal

    public void logFatal(Object msg)

Description copied from interface: `Log`
Logs the given message instance using the 'fatal' level

Specified by:
  `logFatal` in interface `Log`
Parameters:
  `msg` - the message to log

#### logFatal

    public void logFatal(Object msg,
                         Throwable thrown)

Description copied from interface: `Log`
Logs the given message and Throwable at the 'fatal' level.

Specified by:
  `logFatal` in interface `Log`
Parameters:
  `msg` - the message to log
  `thrown` - the throwable to log (may be null)

#### logInfo

    public void logInfo(Object msg)

Description copied from interface: `Log`
Logs the given message instance using the 'info' level

Specified by:
  `logInfo` in interface `Log`
Parameters:
  `msg` - the message to log

#### logInfo

    public void logInfo(Object msg,
                        Throwable thrown)

Description copied from interface: `Log`
Logs the given message and Throwable at the 'info' level.

Specified by:
  `logInfo` in interface `Log`
Parameters:
  `msg` - the message to log
  `thrown` - the throwable to log (may be null)

#### logTrace

    public void logTrace(Object msg)

Description copied from interface: `Log`
Logs the given message instance using the 'trace' level

Specified by:
  `logTrace` in interface `Log`
Parameters:
  `msg` - the message to log

#### logTrace

    public void logTrace(Object msg,
                         Throwable thrown)

Description copied from interface: `Log`
Logs the given message and Throwable at the 'trace' level.

Specified by:
  `logTrace` in interface `Log`
Parameters:
  `msg` - the message to log
  `thrown` - the throwable to log (may be null)

#### logWarn

    public void logWarn(Object msg)

Description copied from interface: `Log`
Logs the given message instance using the 'warn' level

Specified by:
  `logWarn` in interface `Log`
Parameters:
  `msg` - the message to log

#### logWarn

    public void logWarn(Object msg,
                        Throwable thrown)

Description copied from interface: `Log`
Logs the given message and Throwable at the 'warn' level.

Specified by:
  `logWarn` in interface `Log`
Parameters:
  `msg` - the message to log
  `thrown` - the throwable to log (may be null)

Copyright © 2016, 2026, Oracle and/or its affiliates.