1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

5 commits

Author SHA1 Message Date
Akshay Birajdar
b314ab555e Move require active_support/core_ext/string/filters to
`active_job/log_subscriber` from `active_job/logging`
2020-09-24 00:36:09 +05:30
Bibek Shrestha
210bf6aa39 Remove stacktrace from ActiveJob logging callback halts
ActiveJob will log the entire backtrace when one of the enqueue
callbacks fail. This is not necessary and increases noise. When there is
an Exception object, the object gets bubbled up eventually anyways.

Remove `Array(ex.backtrace).join("\n")` from `def enqueue` and `def
enqueue_at`.
2019-12-16 18:46:04 -05:00
Edouard CHIN
0d3aec4969 Fix ActiveJob logging when callback chain is halted:
- ### Problem

  ActiveJob will always log "Enqueued MyJob (Job ID) ..." even
  if the job doesn't get enqueued through the adapter.
  Same problem happens when performing a Job, "Performed MyJob (Job ID) ..." will be logged even when job wasn't performed at all.
  This situation can happen either if the callback chain is terminated
  (before_enqueue throwing an `abort`) or if an exception is raised.

  ### Solution

  Check if the callback chain is aborted/exception is raised, and  log accordingly.
2019-12-09 16:17:55 +01:00
Rafael Mendonça França
ce085f62d4
Add an option to disable logging for jobs with sensitive arguments
class SensitiveJob < ApplicationJob
      self.log_arguments = false

      def perform(my_sensitive_argument)
      end
    end

When dealing with sensitive arugments as password and tokens it is
now possible to configure the job to not put the sensitive argument
in the logs.

Closes #34438.
2019-11-08 13:53:23 -05:00
George Claghorn
e8b3a46d2e Move ActiveJob::LogSubscriber into its own file 2019-09-13 14:53:29 -04:00