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