format the log to json