Writerpublic final class RollingFileWriter extends AbstractFormatPatternWriter
policies and the output can be buffered for improving performance. The path to the log file can contain one or more
patterns that will be resolved at runtime.| Constructor | Description |
|---|---|
RollingFileWriter() |
|
RollingFileWriter(Map<String,String> properties) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Closes the writer.
|
void |
flush() |
Outputs buffered log entries immediately.
|
void |
write(LogEntry logEntry) |
Outputs a given log entry.
|
createByteArrayWriter, getCharset, getCharsetHeader, getFileNamegetRequiredLogEntryValues, rendergetBooleanValue, getStringValue, getStringValuepublic RollingFileWriter()
throws IOException
IOException - Log file cannot be opened for write accessIllegalArgumentException - A property has an invalid value or is missing in configurationpublic RollingFileWriter(Map<String,String> properties) throws IOException
properties - Configuration for writerIOException - Log file cannot be opened for write accessIllegalArgumentException - A property has an invalid value or is missing in configurationpublic void write(LogEntry logEntry) throws IOException
WriterlogEntry - Log entry to outputIOExceptionpublic void flush()
throws IOException
WriterIOExceptionpublic void close()
throws IOException,
InterruptedException
WriterIOExceptionInterruptedExceptionCopyright © 2026. All rights reserved.