I was getting "undefined method 'tagged' for nil:NilClass (NoMethodError)" exceptions in ActiveJob::Logging as logger was nil. I wasn't sure whether I was not setting up logging correctly so I started out with a vanilla Rails project, created an active job class and raised an exception in it. logger wasn't set there either but ActiveJobhandles this case gracefully.
This pull request adds them same handling to the Rails semantic logger.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
I was getting "undefined method 'tagged' for nil:NilClass (NoMethodError)" exceptions in
ActiveJob::Logging
aslogger
wasnil
. I wasn't sure whether I was not setting up logging correctly so I started out with a vanilla Rails project, created an active job class and raised an exception in it.logger
wasn't set there either butActiveJob
handles this case gracefully.This pull request adds them same handling to the Rails semantic logger.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.