Skip to content

Commit

Permalink
Fix crash with JSON 3+
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickTulskie committed Dec 5, 2023
1 parent 5516b4e commit 60ce797
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/resque/scheduler/logger_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ def text_formatter
def json_formatter
proc do |severity, datetime, progname, msg|
require 'json'
JSON.dump(
log_data = {
name: progname,
progname: progname,
level: severity,
timestamp: datetime.iso8601,
msg: msg
) + "\n"
}
JSON.dump(log_data) + "\n"
end
end

Expand Down

0 comments on commit 60ce797

Please sign in to comment.