Check if a log line's source matches the filter list. Empty source is treated as "gateway" for backward compatibility.
(log_source: &str, filters: &[String])
| 721 | /// Check if a log line's source matches the filter list. |
| 722 | /// Empty source is treated as "gateway" for backward compatibility. |
| 723 | pub(super) fn source_matches(log_source: &str, filters: &[String]) -> bool { |
| 724 | let effective = if log_source.is_empty() { |
| 725 | "gateway" |
| 726 | } else { |
| 727 | log_source |
| 728 | }; |
| 729 | filters.iter().any(|f| f == effective) |
| 730 | } |
| 731 | |
| 732 | /// Check if a log line's level meets the minimum level threshold. |
| 733 | /// Empty `min_level` means no filtering (all levels pass). |
no test coverage detected