Package: org.codehaus.groovy.tools.shell.util

## [Java] Class Logger

- org.codehaus.groovy.tools.shell.util.Logger

-     public final class Logger
      extends Object

  Provides a very, very basic logging API.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static IO` | `io` | Shared shell I/O used to emit log messages.
    `String` | `name` | Logger name shown in rendered log messages.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static Logger` | `create(Class type)` Creates a logger named after the supplied type.
    `` | `public static Logger` | `create(Class type, String suffix)` Creates a logger named after the supplied type plus a suffix.
    `` | `public void` | `debug(Object msg)` Logs a debug message when debug output is enabled.
    `` | `public void` | `debug(Object msg, Throwable cause)` Logs a debug message and cause when debug output is enabled.
    `` | `public void` | `error(Object msg)` Logs an error message.
    `` | `public void` | `error(Object msg, Throwable cause)` Logs an error message and cause.
    `` | `public boolean` | `isDebug()` Alias for isDebugEnabled().
    `` | `public boolean` | `isDebugEnabled()` Returns whether debug-level logging is currently enabled.
    `` | `public void` | `warn(Object msg)` Logs a warning message.
    `` | `public void` | `warn(Object msg, Throwable cause)` Logs a warning message and cause.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### public static IO io

      Shared shell I/O used to emit log messages.

    - #### public final String name

      Logger name shown in rendered log messages.

  - ### Method Detail

    - #### public static Logger create(Class type)

      Creates a logger named after the supplied type.

      Parameters:
        `type` - the type whose name should be used
      Returns:
        a logger for the type

    - #### public static Logger create(Class type, String suffix)

      Creates a logger named after the supplied type plus a suffix.

      Parameters:
        `type` - the base type whose name should be used
        `suffix` - the suffix to append
      Returns:
        a logger for the type and suffix

    - #### public void debug(Object msg)

      Logs a debug message when debug output is enabled.

      Parameters:
        `msg` - the message to log

    - #### public void debug(Object msg, Throwable cause)

      Logs a debug message and cause when debug output is enabled.

      Parameters:
        `msg` - the message to log
        `cause` - the associated cause

    - #### public void error(Object msg)

      Logs an error message.

      Parameters:
        `msg` - the message to log

    - #### public void error(Object msg, Throwable cause)

      Logs an error message and cause.

      Parameters:
        `msg` - the message to log
        `cause` - the associated cause

    - #### public boolean isDebug()

      Alias for isDebugEnabled().

      Returns:
        `true` if debug messages should be emitted

    - #### public boolean isDebugEnabled()

      Returns whether debug-level logging is currently enabled.

      Returns:
        `true` if debug messages should be emitted

    - #### public void warn(Object msg)

      Logs a warning message.

      Parameters:
        `msg` - the message to log

    - #### public void warn(Object msg, Throwable cause)

      Logs a warning message and cause.

      Parameters:
        `msg` - the message to log
        `cause` - the associated cause