Sha256: e7dd7885908d9ba48374f9cfec10cbfd276a38b6a3fd7f8427fe8490e2f2a3ee

Contents?: true

Size: 528 Bytes

Versions: 52

Compression:

Stored size: 528 Bytes

Contents

module Rollbar
  class LoggerProxy
    attr_reader :object

    def initialize(object)
      @object = object
    end

    def debug(message)
      log('debug', message)
    end

    def info(message)
      log('info', message)
    end

    def warn(message)
      log('warn', message)
    end

    def error(message)
      log('error', message)
    end

    def log(level, message)
      @object.send(level, message)
    rescue
      puts "[Rollbar] Error logging #{level}:"
      puts "[Rollbar] #{message}"
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
rollbar-2.9.1 lib/rollbar/logger_proxy.rb
rollbar-2.9.0 lib/rollbar/logger_proxy.rb
rollbar-2.8.3 lib/rollbar/logger_proxy.rb
rollbar-2.8.2 lib/rollbar/logger_proxy.rb
rollbar-2.8.1 lib/rollbar/logger_proxy.rb
rollbar-2.8.0 lib/rollbar/logger_proxy.rb
rollbar-2.7.1 lib/rollbar/logger_proxy.rb
rollbar-2.7.0 lib/rollbar/logger_proxy.rb
rollbar-2.6.3 lib/rollbar/logger_proxy.rb
rollbar-2.6.2 lib/rollbar/logger_proxy.rb
rollbar-2.6.1 lib/rollbar/logger_proxy.rb
rollbar-2.6.0 lib/rollbar/logger_proxy.rb
rollbar-2.5.2 lib/rollbar/logger_proxy.rb
rollbar-2.5.1 lib/rollbar/logger_proxy.rb
rollbar-2.5.0 lib/rollbar/logger_proxy.rb
rollbar-2.4.0 lib/rollbar/logger_proxy.rb
rollbar-2.3.0 lib/rollbar/logger_proxy.rb
rollbar-2.2.1 lib/rollbar/logger_proxy.rb
rollbar-2.2.0 lib/rollbar/logger_proxy.rb
rollbar-2.1.2 lib/rollbar/logger_proxy.rb