[#31] Fix middleware emitter to emit log events.