Introduced a listener for logging events