lib/semantic_logger/log.rb in semantic_logger-4.7.4 vs lib/semantic_logger/log.rb in semantic_logger-4.8.0
- old
+ new
@@ -112,17 +112,15 @@
end
end
# Elastic logging: Log when :duration exceeds :min_duration
# Except if there is an exception when it will always be logged
- if duration
- return false if (duration < min_duration) && exception.nil?
- end
+ return false if duration && ((duration < min_duration) && exception.nil?)
if backtrace
self.backtrace = Utils.extract_backtrace(backtrace)
elsif level_index >= SemanticLogger.backtrace_level_index
- self.backtrace = Utils.extract_backtrace
+ self.backtrace = Utils.extract_backtrace(caller)
end
true
end