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, render
public 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
Writer
logEntry
- Log entry to outputIOException
public void flush() throws IOException
Writer
IOException
public void close() throws IOException
Writer
IOException
Copyright © 2020. All rights reserved.