Sha256: b34d43df119e1d6bed845378cd5907a95874805def843165f0c598c884e4329d

Contents?: true

Size: 630 Bytes

Versions: 3

Compression:

Stored size: 630 Bytes

Contents

module ResqueAdmin
  # 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)
      ResqueAdmin.logger.__send__(severity, message) if ResqueAdmin.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

3 entries across 3 versions & 1 rubygems

Version Path
resque_admin-1.0.5 lib/resque_admin/logging.rb
resque_admin-0.2.0 lib/resque_admin/logging.rb
resque_admin-2.4.4 lib/resque_admin/logging.rb