Sha256: 450aa41778798fed84e847455d7a19fa4739eb53d46ba4b5aec03159ec943fc2

Contents?: true

Size: 614 Bytes

Versions: 9

Compression:

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

9 entries across 9 versions & 2 rubygems

Version Path
resque-1.25.2 lib/resque/logging.rb
resque-1.26.pre.0 lib/resque/logging.rb
resque_signal_from_child-1.25.1 lib/resque/logging.rb
resque-1.25.1 lib/resque/logging.rb
resque-1.25.0 lib/resque/logging.rb
resque-1.25.0.pre lib/resque/logging.rb
resque-1.24.1 lib/resque/logging.rb
resque-1.24.0 lib/resque/logging.rb
resque-1.23.1 lib/resque/logging.rb