org.restlet.ext.slf4j

## Class Slf4jLogger

- java.lang.Object
- - java.util.logging.Logger
  - - org.restlet.ext.slf4j.Slf4jLogger

    public class Slf4jLogger
    extends java.util.logging.Logger

JULI logger that efficiently wraps a SLF4J logger. It prevents the creation of intermediary `LogRecord` objects in favor of direct calls to the SLF4J API.

Author:
  Jerome Louvel

### Field Summary

### Fields inherited from class java.util.logging.Logger

`global, GLOBAL_LOGGER_NAME`

### Constructor Summary

Constructors
`` `Slf4jLogger(org.slf4j.Logger slf4jLogger)` Constructor.
`protected` `Slf4jLogger(java.lang.String name, java.lang.String resourceBundleName)` Constructor.

### Method Summary

Methods
`void` `config(java.lang.String msg)` Logs a configuration message.
`void` `fine(java.lang.String msg)` Logs a fine trace.
`void` `finer(java.lang.String msg)` Logs a finer trace.
`void` `finest(java.lang.String msg)` Logs a finest trace.
`org.slf4j.Logger` `getSlf4jLogger()` Returns the wrapped SLF4J logger.
`void` `info(java.lang.String msg)` Logs an info message.
`boolean` `isLoggable(java.util.logging.Level level)`
`void` `log(java.util.logging.Level level, java.lang.String msg)`
`void` `log(java.util.logging.Level level, java.lang.String msg, java.lang.Object param)`
`void` `log(java.util.logging.Level level, java.lang.String msg, java.lang.Object[] params)`
`void` `log(java.util.logging.Level level, java.lang.String msg, java.lang.Throwable thrown)`
`void` `log(java.util.logging.LogRecord record)`
`void` `setSlf4jLogger(org.slf4j.Logger slf4jLogger)` Sets the wrapped SLF4J logger.
`void` `severe(java.lang.String msg)` Logs a severe message.
`void` `warning(java.lang.String msg)` Logs a warning message.

### Methods inherited from class java.util.logging.Logger

`addHandler, entering, entering, entering, exiting, exiting, getAnonymousLogger, getAnonymousLogger, getFilter, getGlobal, getHandlers, getLevel, getLogger, getLogger, getName, getParent, getResourceBundle, getResourceBundleName, getUseParentHandlers, logp, logp, logp, logp, logrb, logrb, logrb, logrb, removeHandler, setFilter, setLevel, setParent, setUseParentHandlers, throwing`

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

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

### Constructor Detail

#### Slf4jLogger

    public Slf4jLogger(org.slf4j.Logger slf4jLogger)

Constructor.

Parameters:
  `slf4jLogger` - The SLF4J logger to wrap.

#### Slf4jLogger

    protected Slf4jLogger(java.lang.String name,
               java.lang.String resourceBundleName)

Constructor.

Parameters:
  `name` - The logger name.
  `resourceBundleName` - The optional resource bundle name.

### Method Detail

#### config

    public void config(java.lang.String msg)

Logs a configuration message. By default, it invokes `Logger.debug(String)`.

Overrides:
  `config` in class `java.util.logging.Logger`
Parameters:
  `msg` - The message to log.

#### fine

    public void fine(java.lang.String msg)

Logs a fine trace. By default, it invokes `Logger.debug(String)`.

Overrides:
  `fine` in class `java.util.logging.Logger`
Parameters:
  `msg` - The message to log.

#### finer

    public void finer(java.lang.String msg)

Logs a finer trace. By default, it invokes `Logger.trace(String)`.

Overrides:
  `finer` in class `java.util.logging.Logger`
Parameters:
  `msg` - The message to log.

#### finest

    public void finest(java.lang.String msg)

Logs a finest trace. By default, it invokes `Logger.trace(String)`.

Overrides:
  `finest` in class `java.util.logging.Logger`
Parameters:
  `msg` - The message to log.

#### getSlf4jLogger

    public org.slf4j.Logger getSlf4jLogger()

Returns the wrapped SLF4J logger.

Returns:
  The wrapped SLF4J logger.

#### info

    public void info(java.lang.String msg)

Logs an info message. By default, it invokes `Logger.info(String)`.

Overrides:
  `info` in class `java.util.logging.Logger`
Parameters:
  `msg` - The message to log.

#### isLoggable

    public boolean isLoggable(java.util.logging.Level level)

Overrides:
  `isLoggable` in class `java.util.logging.Logger`

#### log

    public void log(java.util.logging.Level level,
           java.lang.String msg)

Overrides:
  `log` in class `java.util.logging.Logger`

#### log

    public void log(java.util.logging.Level level,
           java.lang.String msg,
           java.lang.Object param)

Overrides:
  `log` in class `java.util.logging.Logger`

#### log

    public void log(java.util.logging.Level level,
           java.lang.String msg,
           java.lang.Object[] params)

Overrides:
  `log` in class `java.util.logging.Logger`

#### log

    public void log(java.util.logging.Level level,
           java.lang.String msg,
           java.lang.Throwable thrown)

Overrides:
  `log` in class `java.util.logging.Logger`

#### log

    public void log(java.util.logging.LogRecord record)

Overrides:
  `log` in class `java.util.logging.Logger`

#### setSlf4jLogger

    public void setSlf4jLogger(org.slf4j.Logger slf4jLogger)

Sets the wrapped SLF4J logger.

Parameters:
  `slf4jLogger` - The wrapped SLF4J logger.

#### severe

    public void severe(java.lang.String msg)

Logs a severe message. By default, it invokes `Logger.error(String)`.

Overrides:
  `severe` in class `java.util.logging.Logger`
Parameters:
  `msg` - The message to log.

#### warning

    public void warning(java.lang.String msg)

Logs a warning message. By default, it invokes `Logger.warn(String)`.

Overrides:
  `warning` in class `java.util.logging.Logger`
Parameters:
  `msg` - The message to log.