blob: 81859d8da19447666db3baca71c7d3803e120465 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
module ActiveJob
class LogSubscriber < ActiveSupport::LogSubscriber
def enqueue(event)
payload = event.payload
params = payload[:params]
adapter = payload[:adapter]
job = payload[:job]
info "ActiveJob enqueued to #{adapter.name.demodulize} job #{job.name}: #{params.inspect}"
end
def logger
ActiveJob::Base.logger
end
end
end
ActiveJob::LogSubscriber.attach_to :active_job
|