lib/semantic_logger/appender/bugsnag.rb in semantic_logger-4.1.1 vs lib/semantic_logger/appender/bugsnag.rb in semantic_logger-4.2.0
- old
+ new
@@ -46,16 +46,17 @@
h
end
# Send an error notification to Bugsnag
def log(log)
- return false unless should_log?(log)
# Ignore logs coming from Bugsnag itself
return false if log.name == 'Bugsnag'
# Send error messages as Runtime exceptions
exception =
if log.exception
+ # Manually constructed Exception, without a backtrace.
+ log.exception.set_backtrace(log.backtrace) if !log.exception.backtrace && log.backtrace
log.exception
else
error = RuntimeError.new(log.message)
error.set_backtrace(log.backtrace) if log.backtrace
error