Implement MySQL logger, refactor some events and hook the loggers to aggregator and aggregator to events (OMS-372)