lib/logjam_agent/request.rb in logjam_agent-0.24.10 vs lib/logjam_agent/request.rb in logjam_agent-0.25.0

- old
+ new

@@ -73,12 +73,16 @@ @lines << [severity, format_time(timestamp), "... [LINES DROPPED]"] end end end - def add_exception(exception) + def add_exception(exception, severity = Logger::ERROR) @mutex.synchronize do - ((@fields[:exceptions] ||= []) << exception).uniq! + if LogjamAgent.split_hard_and_soft_exceptions && severity < Logger::ERROR + ((@fields[:soft_exceptions] ||= []) << exception).uniq! + else + ((@fields[:exceptions] ||= []) << exception).uniq! + end end end def forward return if @ignored || LogjamAgent.disabled