Sha256: 7233f019539a5726346fa739b90d2fe169c834340a91608134cc356f1f2d74c9
Contents?: true
Size: 513 Bytes
Versions: 4
Compression:
Stored size: 513 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] if logger.nil? logger = ::Logger.new(STDOUT) end logger.send(level, "#{LOG_PREFIX}#{msg}") if logger end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sentry-raven-0.6.1 | lib/raven/logger.rb |
sentry-raven-0.7.1 | lib/raven/logger.rb |
sentry-raven-0.6.0 | lib/raven/logger.rb |
sentry-raven-0.5.0 | lib/raven/logger.rb |