Added support for configurable error, log listeners

Added support for configurable error, log listeners