Sha256: ebb16dec19d23c793fd616556ad15c45e008a73ffd1a67bb4f2b65e41cbc71b0

Contents?: true

Size: 491 Bytes

Versions: 23

Compression:

Stored size: 491 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 = ::Logger.new(STDOUT) if logger.nil?

        logger.send(level, "#{LOG_PREFIX}#{msg}") if logger
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
sentry-raven-0.15.3 lib/raven/logger.rb
sentry-raven-0.15.2 lib/raven/logger.rb
sentry-raven-0.15.1 lib/raven/logger.rb
sentry-raven-0.15.0 lib/raven/logger.rb
sentry-raven-0.14.0 lib/raven/logger.rb
sentry-raven-0.13.3 lib/raven/logger.rb
sentry-raven-0.13.2 lib/raven/logger.rb
sentry-raven-0.13.1 lib/raven/logger.rb
sentry-raven-0.13.0 lib/raven/logger.rb
sentry-raven-0.12.3 lib/raven/logger.rb
sentry-raven-0.12.2 lib/raven/logger.rb
sentry-raven-0.12.1 lib/raven/logger.rb
sentry-raven-0.12.0 lib/raven/logger.rb
mustwin-sentry-raven-0.11.2 lib/raven/logger.rb
sentry-raven-0.11.2 lib/raven/logger.rb
sentry-raven-0.11.1 lib/raven/logger.rb
sentry-raven-0.10.1 lib/raven/logger.rb
sentry-raven-0.9.4 lib/raven/logger.rb
sentry-raven-0.9.3 lib/raven/logger.rb
sentry-raven-0.9.2 lib/raven/logger.rb