mirror of
https://codeberg.org/icewind/logsmash.git
synced 2026-06-03 18:14:11 +02:00
fix sometimes also showing shorter matches
This commit is contained in:
parent
fa539dfeae
commit
78475c1e72
1 changed files with 3 additions and 0 deletions
|
|
@ -100,6 +100,9 @@ impl Matcher {
|
|||
if !log_match.pattern.is_empty()
|
||||
&& match_single(log_match.pattern, log.message.as_ref())
|
||||
{
|
||||
if log_match.pattern_len() > best_length {
|
||||
best_match = None;
|
||||
}
|
||||
best_length = log_match.pattern_len();
|
||||
best_match = Some(match best_match {
|
||||
Some(MatchResult::Single(res)) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue