Package 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
,AutoCloseable
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
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
LoggerWriter
(ExtendedLogger logger, String fqcn, Level level, Marker marker) -
Method Summary
Methods inherited from class java.io.Writer
append, append, append, nullWriter
-
Field Details
-
FQCN
-
writer
-
-
Constructor Details
-
LoggerWriter
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
toString
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Specified by:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-