Closed prikha closed 5 years ago
@reidmorrison 👋
Can you please check it out. Since we have a place for all the Rails-related integrations - I would like to add this ActiveJob
thing it helps a lot in terms of transparency. And it allows not to deal with any internal logging of any available background processing implementation.
Well done extracting all that valuable semantic information. Thank you !!
Issue # (if available)
Right now when I add
rails_semantic_logger
to an application withactive_job
I have rather useless lines in the log. However this could/should be improved. Events have structured payload which comes handy in the logs.https://github.com/rails/rails/blob/master/activejob/lib/active_job/logging.rb
One probably would want to refuse native job adapter logging when this one is setup.
Description of changes
Overriding
ActiveJob::Logging::LogSubscriber
and re-subscribing to the*.active_job
events does the trick.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.