Module: RailsSemanticLogging::JobLogging::ActiveJobPatch

Extended by:
ActiveSupport::Concern
Defined in:
lib/rails_semantic_logging/job_logging/active_job_patch.rb

Overview

ActiveJob patch to provide named tags instead of array tags. Converts the default tag_logger(class, id) call into named tags (job_class, job_id, queue) for structured logging.

Instance Method Summary collapse

Instance Method Details

#tag_logger(job_class = nil, job_id = nil) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/rails_semantic_logging/job_logging/active_job_patch.rb', line 11

def tag_logger(job_class = nil, job_id = nil, &)
  if job_class && job_id
    super(job_class: job_class, job_id: job_id, queue: queue_name, &)
  else
    super(&)
  end
end