lib/mnogootex/log/processor.rb in mnogootex-1.0.1 vs lib/mnogootex/log/processor.rb in mnogootex-1.1.0
- old
+ new
@@ -35,10 +35,10 @@
# @return [Array<Line>]
def self.tag_lines!(lines, matchers:)
tail_length, matcher = 0 # , nil
lines.each do |line|
if tail_length.zero?
- matcher = matchers.detect { |m| m.regexp === line.text }
+ matcher = matchers.detect { |m| line.text =~ m.regexp }
tail_length = matcher&.length&.-(1) || 0
else # still on the tail of the previous match
tail_length -= 1
end
line.level = matcher&.level