Parse log level
(self, line: str)
| 142 | return lines |
| 143 | |
| 144 | def parse_log_level(self, line: str) -> int: |
| 145 | """Parse log level""" |
| 146 | match = re.match(r"^(DEBUG|INFO|WARNING|WARN|ERROR|CRITICAL|FATAL)\b", line) |
| 147 | if match: |
| 148 | level = match.group(1).upper() |
| 149 | return LOG_LEVELS.get(level, -1) |
| 150 | return -1 |
| 151 | |
| 152 | def should_display(self, line: str) -> bool: |
| 153 | """Determine if this log line should be displayed""" |