uk.org.simonsite.log4j.appender
Interface FileRollEventListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
LogFileCompressorTask

public interface FileRollEventListener
extends EventListener

Implementors are notified of a file roll after the roll is complete. A typical use may be, for example, to call FileRollEvent.dispatchToAppender(org.apache.log4j.spi.LoggingEvent) to append a custom logging event directly to the new log file. Alternatively, the FileRollEvent makes available the source Appender, making possible, for example, Appender.doAppend(org.apache.log4j.spi.LoggingEvent) in order to trigger a Filter, or perhaps to log more highly customised messages.

Implementors must be declared public and have a default constructor.

It is not advisable to attempt to move or rename the backup file unless you are fully aware of and accept the fact that doing so may, in the context of the normal operation of the TimeAndSizeRollingAppender, break behavioural contracts and cause log data loss.

FileRollEvents are processed on either an application thread or, if TimeAndSizeRollingAppender.getDateRollEnforced() is true, on the TimeBasedRollEnforcer thread.

Version:
2.1
Author:
Simon Park

Method Summary
 void onFileRoll(FileRollEvent fileRollEvent)
           
 

Method Detail

onFileRoll

void onFileRoll(FileRollEvent fileRollEvent)