Added support for a logger.