Use json format to log error