Writer
public final class SharedFileWriter extends AbstractFormatPatternWriter
Constructor | Description |
---|---|
SharedFileWriter(java.util.Map<java.lang.String,java.lang.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, getFileName, getRequiredLogEntryValues, render
public SharedFileWriter(java.util.Map<java.lang.String,java.lang.String> properties) throws java.io.FileNotFoundException, java.io.IOException
properties
- Configuration for writerjava.io.FileNotFoundException
- Log file does not exist or cannot be opened for any other reasonjava.io.IOException
- Lock for log file cannot be accessedjava.lang.IllegalArgumentException
- Log file is not defined in configurationpublic void write(LogEntry logEntry) throws java.io.IOException
Writer
logEntry
- Log entry to outputjava.io.IOException
public void flush() throws java.io.IOException
Writer
java.io.IOException
public void close() throws java.io.IOException
Writer
java.io.IOException
Copyright © 2018. All rights reserved.