Skip to content

Commit

Permalink
Merge pull request #650 from crest-cassia/hotfix_exception_while_hand…
Browse files Browse the repository at this point in the history
…ling_exception

bugfix: error when message is not a String
  • Loading branch information
takeshi-uchitane committed Nov 25, 2019
2 parents 44c2463 + 398a45e commit d3ae72b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/workers/logger_for_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def initialize(worker_type, logdev, shift_age=0, shift_size=1048576)
end

def send_by_cable(message, severity = :debug)
s = @logger.formatter.call(severity, DateTime.now, nil, message.force_encoding('utf-8').scrub)
s = @logger.formatter.call(severity, DateTime.now, nil, message.to_s.force_encoding('utf-8').scrub)
WorkerLogChannel.broadcast_to('message', {@type => s})
end

Expand Down

0 comments on commit d3ae72b

Please sign in to comment.