lib/airbrake.rb in airbrake-3.1.11 vs lib/airbrake.rb in airbrake-3.1.12
- old
+ new
@@ -4,10 +4,11 @@
end
require 'net/http'
require 'net/https'
require 'rubygems'
+require 'logger'
begin
require 'active_support/core_ext/object/blank'
rescue
require 'activesupport'
@@ -72,10 +73,11 @@
logger.debug LOG_PREFIX + message if logger
end
# Look for the Rails logger currently defined
def logger
- self.configuration.logger
+ self.configuration.logger ||
+ Logger.new(RUBY_PLATFORM =~ /(mingw|bccwin|wince|mswin32)/i ? 'NUL:' : '/dev/null')
end
# Call this method to modify defaults in your initializers.
#
# @example