public interface FileRollEventListener extends EventListener
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.
| Modifier and Type | Method and Description |
|---|---|
void |
onFileRoll(FileRollEvent fileRollEvent) |
void onFileRoll(FileRollEvent fileRollEvent)