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