aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/jobs
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2016-06-17 12:01:03 -0400
committerJean Boussier <jean.boussier@gmail.com>2016-06-17 13:04:17 -0400
commitbe491ecec28cb644c3cbfa785c0313e4eccc49af (patch)
tree87cb31c37f0e257dc027f8383b3fb32bd3e6ea46 /activejob/test/jobs
parent30dd8b2cb0913b2ecc94d2b1d9e29b15e5913f71 (diff)
downloadrails-be491ecec28cb644c3cbfa785c0313e4eccc49af.tar.gz
rails-be491ecec28cb644c3cbfa785c0313e4eccc49af.tar.bz2
rails-be491ecec28cb644c3cbfa785c0313e4eccc49af.zip
Fix jobs overriding AJ::Base#logger
Diffstat (limited to 'activejob/test/jobs')
-rw-r--r--activejob/test/jobs/overridden_logging_job.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activejob/test/jobs/overridden_logging_job.rb b/activejob/test/jobs/overridden_logging_job.rb
new file mode 100644
index 0000000000..2b17a65142
--- /dev/null
+++ b/activejob/test/jobs/overridden_logging_job.rb
@@ -0,0 +1,9 @@
+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