public 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 and Description |
|---|
RollingFileWriter() |
RollingFileWriter(Map<String,String> properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the writer.
|
void |
flush()
Outputs buffered log entries immediately.
|
void |
write(LogEntry logEntry)
Outputs a given log entry.
|
createByteArrayWriter, getCharset, getFileName, getRequiredLogEntryValues, renderpublic RollingFileWriter()
throws FileNotFoundException
FileNotFoundException - Log file does not exist or cannot be opened for any other reasonIllegalArgumentException - A property has an invalid value or is missing in configurationpublic RollingFileWriter(Map<String,String> properties) throws FileNotFoundException
properties - Configuration for writerFileNotFoundException - Log file does not exist or cannot be opened for any other reasonIllegalArgumentException - 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
WriterIOExceptionCopyright © 2020. All rights reserved.