FIX: Undefined method before unicorn boots.

This commit is contained in:
Guo Xiang Tan 2017-11-07 11:52:22 +08:00
parent d9602fe729
commit 8970bdd4fa
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ require 'json'
class UnicornJSONLogFormatter < Logger::Formatter
def call(severity, datetime, progname, message)
default = {
severity: "Logger::Severity::#{severity}".constantize,
severity: Object.const_get("Logger::Severity::#{severity}"),
severity_name: severity,
datetime: DateTime.parse(datetime.to_s).to_s,
progname: progname || '',