Fix format_log method issue.