Replace Monolog middlewares by an event listener