use correct escaping in logger.