lib/honeybadger/config.rb in honeybadger-3.1.2 vs lib/honeybadger/config.rb in honeybadger-3.2.0.beta1
- old
+ new
@@ -54,11 +54,11 @@
init_logging!
init_backend!
logger.info(sprintf('Initializing Honeybadger Error Tracker for Ruby. Ship it! version=%s framework=%s', Honeybadger::VERSION, detected_framework))
- logger.warn('Entering development mode: data will not be reported.') if dev? && backend.kind_of?(Backend::Null)
+ logger.warn('Development mode is enabled. Data will not be reported until you deploy your app.') if warn_development?
self
end
def load!(framework: {}, env: ENV)
@@ -146,10 +146,14 @@
def dev?
self[:env] && Array(self[:development_environments]).include?(self[:env])
end
+ def warn_development?
+ dev? && backend.kind_of?(Backend::Null)
+ end
+
def public?
return true if self[:report_data]
return false if self[:report_data] == false
!self[:env] || !dev?
end
@@ -357,10 +361,10 @@
return build_file_logger(path)
end
return framework[:logger] if framework[:logger]
- Logger.new('/dev/null')
+ Logger.new(nil)
end
def init_logging!
@logger = Logging::ConfigLogger.new(self, build_logger)
end