LogPrintStream (Apache OpenNLP :: Core :: Runtime 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.log, class: LogPrintStream

Package opennlp.tools.log

# Class LogPrintStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
opennlp.tools.log.LogPrintStream

All Implemented Interfaces:
  `Closeable`, `Flushable`, `Appendable`, `AutoCloseable`

@Internal public class LogPrintStream extends PrintStream
This class serves as an adapter for a `Logger` used within a `PrintStream`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LogPrintStream(org.slf4j.Logger logger)`
  Creates a `LogPrintStream` for the given `Logger`.
  `LogPrintStream(org.slf4j.Logger logger, org.slf4j.event.Level level)`
  Creates a `LogPrintStream` for the given `Logger`, which logs at the specified `level`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PrintStream`
  `printf(String format, Object... args)`
  `void`
  `println(String msg)`

  ### Methods inherited from class java.io.PrintStream

  `append, append, append, charset, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, println, println, println, println, println, println, println, println, println, write, write, write, writeBytes`

  ### Methods inherited from class java.io.OutputStream

  `nullOutputStream`

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

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

- ## Constructor Details

  - ### LogPrintStream

    public LogPrintStream(org.slf4j.Logger logger)
    Creates a `LogPrintStream` for the given `Logger`.
    Parameters:
      `logger` - must not be `null`

  - ### LogPrintStream

    public LogPrintStream(org.slf4j.Logger logger, org.slf4j.event.Level level)
    Creates a `LogPrintStream` for the given `Logger`, which logs at the specified `level`.
    Parameters:
      `logger` - must not be `null`
      `level` - must not be `null`

- ## Method Details

  - ### printf

    public PrintStream printf(String format, Object... args)
    Overrides:
      `printf` in class `PrintStream`

  - ### println

    public void println(String msg)
    Overrides:
      `println` in class `PrintStream`