private static final Logger logger = LoggerFactory.getLogger(DatabaseEventFlusher.class);
@Override
public void closing(CommandContext commandContext) {
EventLogEntryEntityManager eventLogEntryEntityManager = commandContext.getEventLogEntryEntityManager();
for (EventLoggerEventHandler eventHandler : eventHandlers) {
try {
eventLogEntryEntityManager.insert(eventHandler.generateEventLogEntry(commandContext));
} catch (Exception e) {
logger.warn("Could not create event log", e);
}
}
}