Sha256: 79d6a7face7c23911cdcdaaba9f19b9d7e51a685bad791f052e6152fa00364d9

Contents?: true

Size: 438 Bytes

Versions: 13

Compression:

Stored size: 438 Bytes

Contents

module Raven
  class Logger
    LOG_PREFIX = "** [Raven] "

    [
      :fatal,
      :error,
      :warn,
      :info,
      :debug,
    ].each do |level|
      define_method level do |*args, &block|
        msg = args[0] # Block-level default args is a 1.9 feature
        msg ||= block.call if block
        logger = Raven.configuration[:logger]
        logger.send(level, "#{LOG_PREFIX}#{msg}") if logger
      end
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sentry-raven-0.4.8 lib/raven/logger.rb
sentry-raven-0.4.7 lib/raven/logger.rb
sentry-raven-0.4.6 lib/raven/logger.rb
sentry-raven-0.4.5 lib/raven/logger.rb
sentry-raven-0.4.4 lib/raven/logger.rb
sentry-raven-0.4.3 lib/raven/logger.rb
sentry-raven-0.4.2 lib/raven/logger.rb
sentry-raven-0.4.1 lib/raven/logger.rb
sentry-raven-0.4.0 lib/raven/logger.rb
sentry-raven-0.3.1 lib/raven/logger.rb
sentry-raven-0.3 lib/raven/logger.rb
sentry-raven-0.2 lib/raven/logger.rb
sentry-raven-0.1 lib/raven/logger.rb