rails/activejob/test/jobs/overridden_logging_job.rb

12 lines
254 B
Ruby
Raw Normal View History

2017-07-10 01:49:52 +08:00
# frozen_string_literal: true
2016-06-18 00:01:03 +08:00
class OverriddenLoggingJob < ActiveJob::Base
def perform(dummy)
logger.info "Dummy, here is it: #{dummy}"
end
def logger
@logger ||= ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(nil))
end
end