Added escaping to logging.