public interface FileConverter
RollingFileWriter
.
All methods are called synchronously by tinylog and will block the program flow. Therefore, slow IO operations and long running computing algorithms should be run in separate non-blocking threads.
Modifier and Type | Method and Description |
---|---|
void |
close()
This method is called when tinylog closes the current log file.
|
String |
getBackupSuffix()
Gets the additional file extension for backup files.
|
void |
open(String fileName)
This method is called when tinylog opens a log file for writing log entries.
|
void |
shutdown()
Shuts this file converter down.
|
byte[] |
write(byte[] data)
This method can convert data before writing to the currently opened log file.
|
String getBackupSuffix()
The method can return null
, if this converter does not create backup files with different file
extensions.
null
void open(String fileName)
fileName
- Log filebyte[] write(byte[] data)
data
- Data to write to the currently opened log filevoid close()
void shutdown() throws InterruptedException
If the converter has started any further threads, this method must await their termination.
InterruptedException
- Interrupted while waitingCopyright © 2020. All rights reserved.