Sha256: 99c7c69f486bf498d3553a6b1a9493ffd61d98352275e7a23bea6e6ec5de179a

Contents?: true

Size: 562 Bytes

Versions: 17

Compression:

Stored size: 562 Bytes

Contents

require 'yell'

module RabbitWQ
  module Logging

    %w(
      debug
      error
      fatal
      info
      warn
    ).each do |level|

      define_method level do |*messages|
        return unless RabbitWQ.logger
        messages.each do |message|
          RabbitWQ.logger.send level, message
        end
      end

      define_method "worker_#{level}" do |worker, *messages|
        return unless RabbitWQ.work_logger
        messages.each do |message|
          RabbitWQ.work_logger.send level, worker, message
        end
      end

    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rabbit-wq-1.9.0 lib/rabbit_wq/logging.rb
rabbit-wq-1.8.0 lib/rabbit_wq/logging.rb
rabbit-wq-1.7.0 lib/rabbit_wq/logging.rb
rabbit-wq-1.6.3 lib/rabbit_wq/logging.rb
rabbit-wq-1.6.2 lib/rabbit_wq/logging.rb
rabbit-wq-1.6.1 lib/rabbit_wq/logging.rb
rabbit-wq-1.6.0 lib/rabbit_wq/logging.rb
rabbit-wq-1.5.0 lib/rabbit_wq/logging.rb
rabbit-wq-1.4.0 lib/rabbit_wq/logging.rb
rabbit-wq-1.3.0 lib/rabbit_wq/logging.rb
rabbit-wq-1.2.1 lib/rabbit_wq/logging.rb
rabbit-wq-1.2.0 lib/rabbit_wq/logging.rb
rabbit-wq-1.1.0 lib/rabbit_wq/logging.rb
rabbit-wq-1.0.0 lib/rabbit_wq/logging.rb
rabbit-wq-0.5.0 lib/rabbit_wq/logging.rb
rabbit-wq-0.4.0 lib/rabbit_wq/logging.rb
rabbit-wq-0.3.0 lib/rabbit_wq/logging.rb