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

## org.apache.logging.log4j.io
Class LoggerFilterWriter

    java.lang.Object
      java.io.Writer
          java.io.FilterWriter
              org.apache.logging.log4j.io.LoggerFilterWriter

All Implemented Interfaces:
  Closeable, Flushable, Appendable

    public class LoggerFilterWriter

extends FilterWriter

Logs each line written to a pre-defined level. Can also be configured with a Marker. This class provides an interface that follows the `Writer` methods in spirit, but doesn't require output to any external out.

Since:
  2.1

Field Summary

Fields inherited from class java.io.FilterWriter
`out`

Fields inherited from class java.io.Writer
`lock`

Constructor Summary
`protected` | `LoggerFilterWriter(Writer out, org.apache.logging.log4j.spi.ExtendedLogger logger, String fqcn, org.apache.logging.log4j.Level level, org.apache.logging.log4j.Marker marker)`

Method Summary
`void` | `close()`
`void` | `flush()`
`String` | `toString()`
`void` | `write(char[] cbuf)`
`void` | `write(char[] cbuf, int off, int len)`
`void` | `write(int c)`
`void` | `write(String str)`
`void` | `write(String str, int off, int len)`

Methods inherited from class java.io.Writer
`append, append, append`

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

Constructor Detail

### LoggerFilterWriter

    protected LoggerFilterWriter(Writer out,
                                 org.apache.logging.log4j.spi.ExtendedLogger logger,
                                 String fqcn,
                                 org.apache.logging.log4j.Level level,
                                 org.apache.logging.log4j.Marker marker)

Method Detail

### close

    public void close()
               throws IOException

  Specified by:
    `close` in interface `Closeable`
  Overrides:
    `close` in class `FilterWriter`
  Throws:
    `IOException`

### flush

    public void flush()
               throws IOException

  Specified by:
    `flush` in interface `Flushable`
  Overrides:
    `flush` in class `FilterWriter`
  Throws:
    `IOException`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### write

    public void write(char[] cbuf)
               throws IOException

  Overrides:
    `write` in class `Writer`
  Throws:
    `IOException`

### write

    public void write(char[] cbuf,
                      int off,
                      int len)
               throws IOException

  Overrides:
    `write` in class `FilterWriter`
  Throws:
    `IOException`

### write

    public void write(int c)
               throws IOException

  Overrides:
    `write` in class `FilterWriter`
  Throws:
    `IOException`

### write

    public void write(String str)
               throws IOException

  Overrides:
    `write` in class `Writer`
  Throws:
    `IOException`

### write

    public void write(String str,
                      int off,
                      int len)
               throws IOException

  Overrides:
    `write` in class `FilterWriter`
  Throws:
    `IOException`

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

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.