Sha256: 7b056fcf0cd5d4fa281742b90685fe47ebcf5cca41fac6957c97103eeae30bb5

Contents?: true

Size: 615 Bytes

Versions: 14

Compression:

Stored size: 615 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

14 entries across 14 versions & 6 rubygems

Version Path
resque-2.0.0 lib/resque/logging.rb
resque_admin-1.0.4 lib/resque_admin/logging.rb
resque_admin-1.0.3 lib/resque/logging.rb
resque_admin-1.0.2 lib/resque/logging.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/resque-1.27.4/lib/resque/logging.rb
resque-1.27.4 lib/resque/logging.rb
resque-1.27.3 lib/resque/logging.rb
resque-1.27.2 lib/resque/logging.rb
resque-1.27.1 lib/resque/logging.rb
resque-1.27.0 lib/resque/logging.rb
resqueue-1.0.0 lib/resque/logging.rb
resque-master-0.0.3 lib/resque/logging.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/resque-1.26.0/lib/resque/logging.rb
resque-1.26.0 lib/resque/logging.rb