public final class FileWriter extends AbstractFormatPatternWriter
| Constructor and Description |
|---|
FileWriter() |
FileWriter(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 FileWriter()
throws FileNotFoundException
FileNotFoundException - Log file does not exist or cannot be opened for any other reasonIllegalArgumentException - Log file is not defined in configurationpublic FileWriter(Map<String,String> properties) throws FileNotFoundException
properties - Configuration for writerFileNotFoundException - Log file does not exist or cannot be opened for any other reasonIllegalArgumentException - Log file is not defined 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.