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
ConstructorsModifierConstructorDescriptionprotectedLoggerWriter(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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
toString
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-