Package icyllis.modernui.core

# Class LogWriter

java.lang.Object
java.io.Writer
icyllis.modernui.core.LogWriter

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

public class LogWriter extends Writer
Buffered writer to log4j logger, auto flush on newline.

- ## Field Summary

  ### Fields inherited from class java.io.Writer

  `lock`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LogWriter(org.apache.logging.log4j.Logger logger)`
  `LogWriter(org.apache.logging.log4j.Logger logger, org.apache.logging.log4j.Level level, org.apache.logging.log4j.Marker marker)`
  Create a new Writer that sends to the log with the given tag.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `void`
  `flush()`
  `void`
  `write(char[] buf, int offset, int count)`

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

  `append, append, append, nullWriter, write, write, write, write`

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

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

- ## Constructor Details

  - ### LogWriter

    public LogWriter(@NonNull org.apache.logging.log4j.Logger logger)

  - ### LogWriter

    public LogWriter(@NonNull org.apache.logging.log4j.Logger logger, @NonNull org.apache.logging.log4j.Level level, @Nullable org.apache.logging.log4j.Marker marker)
    Create a new Writer that sends to the log with the given tag.

- ## Method Details

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Specified by:
      `close` in class `Writer`

  - ### flush

    public void flush()
    Specified by:
      `flush` in interface `Flushable`
    Specified by:
      `flush` in class `Writer`

  - ### write

    public void write(@NonNull char[] buf, int offset, int count)
    Specified by:
      `write` in class `Writer`