Module: Resque::Plugins::Retry::Logging

Included in:
Failure::MultipleWithRetrySuppression, Resque::Plugins::Retry
Defined in:
lib/resque/plugins/retry/logging.rb

Instance Method Summary collapse

Instance Method Details

#log_message(message, args = nil, exception = nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Log messages through the Resque logger (DEBUG level). Generally not for application logging-just for inner-workings of Resque and plugins.

Parameters:

  • message (String)

    to log

  • args (Object) (defaults to: nil)

    of the resque job in context

  • exception (Object) (defaults to: nil)

    that might be causing a retry



14
15
16
17
18
19
# File 'lib/resque/plugins/retry/logging.rb', line 14

def log_message(message, args=nil, exception=nil)
  return unless Resque.logger

  exception_portion = exception.nil? ? '' : " [#{exception.class}/#{exception}]"
  Resque.logger.debug "resque-retry -- #{args.inspect}#{exception_portion}: #{message}"
end