Class LoggingEventListener
java.lang.Object
org.apache.fop.event.LoggingEventListener
- All Implemented Interfaces:
EventListener, EventListener
EventListener implementation that redirects events to Commons Logging. The events are
converted to localized messages.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static org.apache.commons.logging.LogDefault logger instanceprivate org.apache.commons.logging.Logprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance logging to the default log category of this class.LoggingEventListener(org.apache.commons.logging.Log log) Creates an instance logging to a given logger.LoggingEventListener(org.apache.commons.logging.Log log, boolean skipFatal) Creates an instance logging to a given logger. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.logging.LoggetLog()Returns the target logger for this instance.voidprocessEvent(Event event) This method is called for each event that is generated.
-
Field Details
-
defaultLog
private static org.apache.commons.logging.Log defaultLogDefault logger instance -
log
private org.apache.commons.logging.Log log -
skipFatal
private boolean skipFatal -
loggedMessages
-
-
Constructor Details
-
LoggingEventListener
public LoggingEventListener()Creates an instance logging to the default log category of this class. -
LoggingEventListener
public LoggingEventListener(org.apache.commons.logging.Log log) Creates an instance logging to a given logger. Events with fatal severity level will be skipped.- Parameters:
log- the target logger
-
LoggingEventListener
public LoggingEventListener(org.apache.commons.logging.Log log, boolean skipFatal) Creates an instance logging to a given logger.- Parameters:
log- the target loggerskipFatal- true if events with fatal severity level should be skipped (i.e. not logged)
-
-
Method Details
-
getLog
public org.apache.commons.logging.Log getLog()Returns the target logger for this instance.- Returns:
- the target logger
-
processEvent
This method is called for each event that is generated. With the event's ID it is possible to react to certain events. Events can also simply be recorded and presented to a user. It is possible to throw an (unchecked) exception if the processing needs to be aborted because some special event occurred. This way the client can configure the behaviour of the observed application.- Specified by:
processEventin interfaceEventListener- Parameters:
event- the event
-