Module: BackgroundWorker::Logging

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/background_worker/logging.rb

Instance Method Summary collapse

Instance Method Details

#log(message, options = {}) ⇒ Object



11
12
13
14
# File 'lib/background_worker/logging.rb', line 11

def log(message, options = {})
  severity = options.fetch(:severity, :info)
  logger.send(severity, "job_id=#{job_id} #{message}")
end

#loggerObject



7
8
9
# File 'lib/background_worker/logging.rb', line 7

def logger
  BackgroundWorker.logger
end