aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-08-22 12:09:32 +0200
committerYves Senn <yves.senn@gmail.com>2014-08-22 12:09:32 +0200
commitf020f302ad8e3be9ccd06099e59337afa1bb5000 (patch)
tree2071f5141c4afb81693e61ef008a2c0e7c6b88ba /activejob/lib/active_job
parent6fa5f85eb4c0bd27e58a09a9b8d8447098c38fdc (diff)
parentfb740239dc0ea7e543388f057e205c68b67a449c (diff)
downloadrails-f020f302ad8e3be9ccd06099e59337afa1bb5000.tar.gz
rails-f020f302ad8e3be9ccd06099e59337afa1bb5000.tar.bz2
rails-f020f302ad8e3be9ccd06099e59337afa1bb5000.zip
Merge pull request #16633 from tgxworld/prefer_log_message_through_block
Pass logging message through block.
Diffstat (limited to 'activejob/lib/active_job')
-rw-r--r--activejob/lib/active_job/logging.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activejob/lib/active_job/logging.rb b/activejob/lib/active_job/logging.rb
index d9e544acf5..ae098a80f3 100644
--- a/activejob/lib/active_job/logging.rb
+++ b/activejob/lib/active_job/logging.rb
@@ -52,19 +52,19 @@ module ActiveJob
class LogSubscriber < ActiveSupport::LogSubscriber
def enqueue(event)
- info "Enqueued #{event.payload[:job].name} (Job ID: #{event.payload[:job_id]}) to #{queue_name(event)}" + args_info(event)
+ info { "Enqueued #{event.payload[:job].name} (Job ID: #{event.payload[:job_id]}) to #{queue_name(event)}" + args_info(event) }
end
def enqueue_at(event)
- info "Enqueued #{event.payload[:job].name} (Job ID: #{event.payload[:job_id]}) to #{queue_name(event)} at #{enqueued_at(event)}" + args_info(event)
+ info { "Enqueued #{event.payload[:job].name} (Job ID: #{event.payload[:job_id]}) to #{queue_name(event)} at #{enqueued_at(event)}" + args_info(event) }
end
def perform_start(event)
- info "Performing #{event.payload[:job].name} from #{queue_name(event)}" + args_info(event)
+ info { "Performing #{event.payload[:job].name} from #{queue_name(event)}" + args_info(event) }
end
def perform(event)
- info "Performed #{event.payload[:job].name} from #{queue_name(event)} in #{event.duration.round(2).to_s}ms"
+ info { "Performed #{event.payload[:job].name} from #{queue_name(event)} in #{event.duration.round(2).to_s}ms" }
end
private