Add flushLoggedEvents.