Use event listeners instead of injecting a logger directly