Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atomikos.diagnostics
Class Slf4jConsole

    java.lang.Object
      com.atomikos.diagnostics.Slf4jConsole

All Implemented Interfaces:
  Console

    public class Slf4jConsole

extends Object
implements Console

A console that delegates to slf4j - this ensures log4j compatibility.

Field Summary

Fields inherited from interface com.atomikos.diagnostics.Console
`DEBUG, INFO, WARN`

Constructor Summary
`Slf4jConsole()`

Method Summary
`void` | `close()` Closes the console after use.
`int` | `getLevel()` The level.
`void` | `print(String string)` This method does nothing for SLF4J - printing without newline would be too expensive since it is not supported in SLF4J.
`void` | `print(String string, int level)` This method does nothing for SLF4J - printing without newline would be too expensive since it is not supported in SLF4J.
`void` | `println(String string)` Print a message to the output of the console.
`void` | `println(String string, int level)` Print a string with newline, at a given level of granularity.
`void` | `setLevel(int level)` Setting the level has no filtering effect for this class: the output level is determined by the underlying logging tool's separate configuration.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Slf4jConsole

    public Slf4jConsole()

Method Detail

### close

    public void close()
               throws IOException

  Description copied from interface: `Console`
  Closes the console after use.

  Specified by:
    `close` in interface `Console`
  Throws:
    `IOException` - On failure.

### getLevel

    public int getLevel()

  The level. Note that this level is only returned for consistency with the API documentation; it is ignored by this console.

  Specified by:
    `getLevel` in interface `Console`
  Returns:
    The log level.

### print

    public void print(String string)
               throws IOException

  This method does nothing for SLF4J - printing without newline would be too expensive since it is not supported in SLF4J.

  Specified by:
    `print` in interface `Console`
  Parameters:
    `string` - The string to print.
  Throws:
    `IOException` - On failure.

### print

    public void print(String string,
                      int level)
               throws IOException

  This method does nothing for SLF4J - printing without newline would be too expensive since it is not supported in SLF4J.

  Specified by:
    `print` in interface `Console`
  Parameters:
    `string` - The string
    `level` - The level (one of the predefined constants).
  Throws:
    `IOException` - On failure.

### println

    public void println(String string)
                 throws IOException

  Description copied from interface: `Console`
  Print a message to the output of the console. The level is assumed to be the default (WARN).

  Specified by:
    `println` in interface `Console`
  Parameters:
    `string` - The message to output.
  Throws:
    `IOException` - On failure.

### println

    public void println(String string,
                        int level)
                 throws IOException

  Description copied from interface: `Console`
  Print a string with newline, at a given level of granularity.

  Specified by:
    `println` in interface `Console`
  Parameters:
    `string` - The string.
    `level` - The level (one of the predefined constants).
  Throws:
    `IOException` - On failure.

### setLevel

    public void setLevel(int level)

  Setting the level has no filtering effect for this class: the output level is determined by the underlying logging tool's separate configuration. However, we still maintain the level to make sure the CascadedConsole works.

  Specified by:
    `setLevel` in interface `Console`
  Parameters:
    `level` - The level, one of the predefined constants. Default is WARN.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.