Writerpublic final class FileWriter extends AbstractFormatPatternWriter
| Constructor | Description |
|---|---|
FileWriter(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, renderpublic FileWriter(java.util.Map<java.lang.String,java.lang.String> properties)
throws java.io.FileNotFoundException
properties - Configuration for writerjava.io.FileNotFoundException - Log file does not exist or cannot be opened for any other reasonjava.lang.IllegalArgumentException - Log file is not defined in configurationpublic void write(LogEntry logEntry) throws java.io.IOException
WriterlogEntry - Log entry to outputjava.io.IOExceptionpublic void flush()
throws java.io.IOException
Writerjava.io.IOExceptionpublic void close()
throws java.io.IOException
Writerjava.io.IOExceptionCopyright © 2019. All rights reserved.