Package org.mariadb.jdbc.util.log

## Class ConsoleLogger

- java.lang.Object
- - org.mariadb.jdbc.util.log.ConsoleLogger

All Implemented Interfaces:
  `Logger`

    public class ConsoleLogger
    extends Object
    implements Logger

Logger that will log to console

### Constructor Summary

Constructors
`ConsoleLogger​(String name, PrintStream log, PrintStream err, boolean logDebugLvl)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `debug​(String msg)` Log a message at the DEBUG level.
`void` `debug​(String format, Object... arguments)` Log a message at the DEBUG level.
`void` `debug​(String msg, Throwable t)` Log a message with an error at the DEBUG level.
`void` `error​(String msg)` Log a message at the ERROR level.
`void` `error​(String format, Object... arguments)` Log a message at the ERROR level.
`void` `error​(String msg, Throwable t)` Log a message with an error at the ERROR level.
`String` `getName()` Logger name
`void` `info​(String msg)` Log a message at the INFO level.
`void` `info​(String format, Object... arguments)` Log a message at the INFO level.
`void` `info​(String msg, Throwable t)` Log a message with an error at the INFO level.
`boolean` `isDebugEnabled()` must DEBUG level message be logged
`boolean` `isErrorEnabled()` Must ERROR level be logged
`boolean` `isInfoEnabled()` Must INFO level be logged
`boolean` `isTraceEnabled()` Must TRACE level be logged
`boolean` `isWarnEnabled()` Must WARN level be logged
`void` `trace​(String msg)` Log a message at the TRACE level.
`void` `trace​(String format, Object... arguments)` Log a message at the TRACE level.
`void` `trace​(String msg, Throwable t)` Log a message with an error at the TRACE level.
`void` `warn​(String msg)` Log a message at the WARN level.
`void` `warn​(String format, Object... arguments)` Log a message at the WARNING level.
`void` `warn​(String msg, Throwable t)` Log a message with an error at the WARNING level.

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

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

### Constructor Detail

#### ConsoleLogger

    public ConsoleLogger​(String name,
                         PrintStream log,
                         PrintStream err,
                         boolean logDebugLvl)

Constructor. All logs will be send to console.

Parameters:
  `name` - name to log
  `log` - log stream
  `err` - error stream
  `logDebugLvl` - log level

### Method Detail

#### getName

    public String getName()

Description copied from interface: `Logger`
Logger name

Specified by:
  `getName` in interface `Logger`
Returns:
  logger name

#### isTraceEnabled

    public boolean isTraceEnabled()

Description copied from interface: `Logger`
Must TRACE level be logged

Specified by:
  `isTraceEnabled` in interface `Logger`
Returns:
  if TRACE level be logger

#### trace

    public void trace​(String msg)

Description copied from interface: `Logger`
Log a message at the TRACE level.

Specified by:
  `trace` in interface `Logger`
Parameters:
  `msg` - the message string to be logged

#### trace

    public void trace​(String format,
                      Object... arguments)

Description copied from interface: `Logger`
Log a message at the TRACE level.

Specified by:
  `trace` in interface `Logger`
Parameters:
  `format` - the format string
  `arguments` - arguments

#### trace

    public void trace​(String msg,
                      Throwable t)

Description copied from interface: `Logger`
Log a message with an error at the TRACE level.

Specified by:
  `trace` in interface `Logger`
Parameters:
  `msg` - message
  `t` - error

#### isDebugEnabled

    public boolean isDebugEnabled()

Description copied from interface: `Logger`
must DEBUG level message be logged

Specified by:
  `isDebugEnabled` in interface `Logger`
Returns:
  are DEBUG message to be logged

#### debug

    public void debug​(String msg)

Description copied from interface: `Logger`
Log a message at the DEBUG level.

Specified by:
  `debug` in interface `Logger`
Parameters:
  `msg` - the message string to be logged

#### debug

    public void debug​(String format,
                      Object... arguments)

Description copied from interface: `Logger`
Log a message at the DEBUG level.

Specified by:
  `debug` in interface `Logger`
Parameters:
  `format` - the format string
  `arguments` - arguments

#### debug

    public void debug​(String msg,
                      Throwable t)

Description copied from interface: `Logger`
Log a message with an error at the DEBUG level.

Specified by:
  `debug` in interface `Logger`
Parameters:
  `msg` - message
  `t` - error

#### isInfoEnabled

    public boolean isInfoEnabled()

Description copied from interface: `Logger`
Must INFO level be logged

Specified by:
  `isInfoEnabled` in interface `Logger`
Returns:
  if INFO level be logger

#### info

    public void info​(String msg)

Description copied from interface: `Logger`
Log a message at the INFO level.

Specified by:
  `info` in interface `Logger`
Parameters:
  `msg` - the message string to be logged

#### info

    public void info​(String format,
                     Object... arguments)

Description copied from interface: `Logger`
Log a message at the INFO level.

Specified by:
  `info` in interface `Logger`
Parameters:
  `format` - the format string
  `arguments` - arguments

#### info

    public void info​(String msg,
                     Throwable t)

Description copied from interface: `Logger`
Log a message with an error at the INFO level.

Specified by:
  `info` in interface `Logger`
Parameters:
  `msg` - message
  `t` - error

#### isWarnEnabled

    public boolean isWarnEnabled()

Description copied from interface: `Logger`
Must WARN level be logged

Specified by:
  `isWarnEnabled` in interface `Logger`
Returns:
  if WARN level be logger

#### warn

    public void warn​(String msg)

Description copied from interface: `Logger`
Log a message at the WARN level.

Specified by:
  `warn` in interface `Logger`
Parameters:
  `msg` - the message string to be logged

#### warn

    public void warn​(String format,
                     Object... arguments)

Description copied from interface: `Logger`
Log a message at the WARNING level.

Specified by:
  `warn` in interface `Logger`
Parameters:
  `format` - the format string
  `arguments` - arguments

#### warn

    public void warn​(String msg,
                     Throwable t)

Description copied from interface: `Logger`
Log a message with an error at the WARNING level.

Specified by:
  `warn` in interface `Logger`
Parameters:
  `msg` - message
  `t` - error

#### isErrorEnabled

    public boolean isErrorEnabled()

Description copied from interface: `Logger`
Must ERROR level be logged

Specified by:
  `isErrorEnabled` in interface `Logger`
Returns:
  if ERROR level be logger

#### error

    public void error​(String msg)

Description copied from interface: `Logger`
Log a message at the ERROR level.

Specified by:
  `error` in interface `Logger`
Parameters:
  `msg` - the message string to be logged

#### error

    public void error​(String format,
                      Object... arguments)

Description copied from interface: `Logger`
Log a message at the ERROR level.

Specified by:
  `error` in interface `Logger`
Parameters:
  `format` - the format string
  `arguments` - arguments

#### error

    public void error​(String msg,
                      Throwable t)

Description copied from interface: `Logger`
Log a message with an error at the ERROR level.

Specified by:
  `error` in interface `Logger`
Parameters:
  `msg` - message
  `t` - error