DefaultDbToLogConverter¶
-
public class
DefaultDbToLogConverterimplements EventToLogConverter<EventLog>¶ Implementaton of the
EventToLogConverterinterface. This class is responsible for convertingMotechEvents to the class persistable in the database.
Methods¶
configuredConvertEventToDbLog¶
-
public EventLog
configuredConvertEventToDbLog(MotechEvent eventToLog, LoggableEvent loggableEvent)¶ Converts an event to a
EventLogobject, which represents a single logged event in database. UsesDbLoggableEventimplementation of LoggableEvent to configure the returned object.Parameters: - eventToLog – the incoming motech event to be converted to a database event log
- loggableEvent – contains data about an event to log, used to configure returned log instance
Throws: - org.motechproject.commons.api.MotechException – if the passed LoggableEvent is not an instance of DbLoggableEvent
Returns: EventLog object that is used to log the event to the database