Writer
public final class RollingFileWriter extends AbstractFormatPatternWriter
policies
and the output can be buffered for improving performance. The path to the log file can contain one or more
patterns that will be resolved at runtime.Constructor | Description |
---|---|
RollingFileWriter() |
|
RollingFileWriter(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, getCharsetHeader, getFileName
getRequiredLogEntryValues, render
getBooleanValue, getStringValue
public RollingFileWriter() throws java.io.IOException
java.io.IOException
- Log file cannot be opened for write accessjava.lang.IllegalArgumentException
- A property has an invalid value or is missing in configurationpublic RollingFileWriter(java.util.Map<java.lang.String,java.lang.String> properties) throws java.io.IOException
properties
- Configuration for writerjava.io.IOException
- Log file cannot be opened for write accessjava.lang.IllegalArgumentException
- A property has an invalid value or is missing 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, java.lang.InterruptedException
Writer
java.io.IOException
java.lang.InterruptedException
Copyright © 2022. All rights reserved.