org.apache.logging.log4j.io
Class LoggerWriter
java.lang.Object
java.io.Writer
org.apache.logging.log4j.io.LoggerWriter
- All Implemented Interfaces:
- Closeable, Flushable, Appendable
public class LoggerWriter
- extends Writer
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 writer.
- Since:
- 2.1
|
Constructor Summary |
protected |
LoggerWriter(org.apache.logging.log4j.spi.ExtendedLogger logger,
String fqcn,
org.apache.logging.log4j.Level level,
org.apache.logging.log4j.Marker marker)
|
LoggerWriter
protected LoggerWriter(org.apache.logging.log4j.spi.ExtendedLogger logger,
String fqcn,
org.apache.logging.log4j.Level level,
org.apache.logging.log4j.Marker marker)
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Specified by:
close in class Writer
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush in interface Flushable- Specified by:
flush in class Writer
- 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
- Specified by:
write in class Writer
- Throws:
IOException
write
public void write(int c)
throws IOException
- Overrides:
write in class Writer
- 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 Writer
- Throws:
IOException
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.