Added support for logging.