uk.org.simonsite.log4j.appender
Class FileRollEvent

java.lang.Object
  extended by org.apache.log4j.spi.LoggingEvent
      extended by uk.org.simonsite.log4j.appender.FileRollEvent
All Implemented Interfaces:
Serializable

public final class FileRollEvent
extends LoggingEvent

This event is fired after the current log file has been renamed as a backup and a new file already opened for logging. This event is capable of both self-dispatch to the underlying source appender, and the dispatch of other custom logging event objects.

Version:
2.8
Author:
Simon Park
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.log4j.spi.LoggingEvent
categoryName, fqnOfCategoryClass, level, timeStamp
 
Constructor Summary
FileRollEvent(FileRoller source, File backupFile)
           
 
Method Summary
(package private)  void dispatchToAppender()
          Convenience method dispatches this object to the source appender, which will result in a default message being appended to the new file.
(package private)  void dispatchToAppender(LoggingEvent customLoggingEvent)
          Convenience method dispatches the specified event to the source appender, which will result in the custom event data being appended to the new file.
(package private)  void dispatchToAppender(String message)
          Convenience method dispatches this object to the source appender, which will result in the custom message being appended to the new file.
 File getBackupFile()
           
 
Methods inherited from class org.apache.log4j.spi.LoggingEvent
getFQNOfLoggerClass, getLevel, getLocationInformation, getLogger, getLoggerName, getMDC, getMDCCopy, getMessage, getNDC, getProperties, getProperty, getPropertyKeySet, getRenderedMessage, getStartTime, getThreadName, getThrowableInformation, getThrowableStrRep, getTimeStamp, locationInformationExists, removeProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileRollEvent

FileRollEvent(FileRoller source,
              File backupFile)
Parameters:
source - The originator of the event.
backupFile - The newly-created backup file.
Method Detail

getBackupFile

public final File getBackupFile()
Returns:
The backup File.

dispatchToAppender

final void dispatchToAppender(String message)
Convenience method dispatches this object to the source appender, which will result in the custom message being appended to the new file.

Parameters:
message - The custom logging message to be appended.

dispatchToAppender

final void dispatchToAppender()
Convenience method dispatches this object to the source appender, which will result in a default message being appended to the new file.


dispatchToAppender

final void dispatchToAppender(LoggingEvent customLoggingEvent)
Convenience method dispatches the specified event to the source appender, which will result in the custom event data being appended to the new file.

Parameters:
customLoggingEvent - The custom Log4J event to be appended.