Sha256: ccf91e959d7c79d51dde4b2105aa3bcc2c01a72c11eb716b7088d73264803c4b

Contents?: true

Size: 611 Bytes

Versions: 8

Compression:

Stored size: 611 Bytes

Contents

module Resque
  # Include this module in classes you wish to have logging facilities
  module Logging
    module_function

    # Thunk to the logger's own log method (if configured)
    def self.log(severity, message)
      Resque.logger.__send__(severity, message) if Resque.logger
    end

    # Log level aliases
    def debug(message); Logging.log :debug, message; end
    def info(message);  Logging.log :info,  message; end
    def warn(message);  Logging.log :warn,  message; end
    def error(message); Logging.log :error, message; end
    def fatal(message); Logging.log :fatal, message; end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
resque-2.7.0 lib/resque/logging.rb
resque-2.6.0 lib/resque/logging.rb
resque-2.5.0 lib/resque/logging.rb
resque-2.4.0 lib/resque/logging.rb
resque-2.3.0 lib/resque/logging.rb
resque-2.2.1 lib/resque/logging.rb
resque-2.2.0 lib/resque/logging.rb
resque-2.1.0 lib/resque/logging.rb