From ffe823ed322ee685457c68e2daed40732ee9b1cd Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 6 Nov 2017 16:40:11 +0800 Subject: [PATCH] Ensure we log the datetime in the format that we want. --- lib/unicorn/unicorn_json_log_formatter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn/unicorn_json_log_formatter.rb b/lib/unicorn/unicorn_json_log_formatter.rb index 7d68d7368e9..d0695d999a5 100644 --- a/lib/unicorn/unicorn_json_log_formatter.rb +++ b/lib/unicorn/unicorn_json_log_formatter.rb @@ -4,7 +4,7 @@ class UnicornJSONLogFormatter < Logger::Formatter def call(severity, datetime, progname, message) default = { severity: severity, - datetime: datetime, + datetime: DateTime.parse(datetime).to_s, progname: progname || '', pid: $$, }