aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/logging.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activejob/lib/active_job/logging.rb')
-rw-r--r--activejob/lib/active_job/logging.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/activejob/lib/active_job/logging.rb b/activejob/lib/active_job/logging.rb
index bb96668cfb..cd29e6908e 100644
--- a/activejob/lib/active_job/logging.rb
+++ b/activejob/lib/active_job/logging.rb
@@ -3,7 +3,7 @@ require 'active_support/tagged_logging'
require 'active_support/logger'
module ActiveJob
- module Logging
+ module Logging #:nodoc:
extend ActiveSupport::Concern
included do
@@ -75,7 +75,7 @@ module ActiveJob
def perform(event)
info do
job = event.payload[:job]
- "Performed #{job.class.name} from #{queue_name(event)} in #{event.duration.round(2).to_s}ms"
+ "Performed #{job.class.name} from #{queue_name(event)} in #{event.duration.round(2)}ms"
end
end
@@ -85,7 +85,12 @@ module ActiveJob
end
def args_info(job)
- job.arguments.any? ? " with arguments: #{job.arguments.map(&:inspect).join(", ")}" : ""
+ if job.arguments.any?
+ ' with arguments: ' +
+ job.arguments.map { |arg| arg.try(:to_global_id).try(:to_s) || arg.inspect }.join(', ')
+ else
+ ''
+ end
end
def scheduled_at(event)