Updated for configurable logging.