(cls, line)
| 26 | class Log(namedtuple("Log", "timestamp level line")): |
| 27 | @classmethod |
| 28 | def parse(cls, line): |
| 29 | if line.startswith("=="): |
| 30 | pid, line = line[2:].split("== ", 1) |
| 31 | return cls(None, "valgrind", f"{pid}: {line}") |
| 32 | elif not line.startswith("["): |
| 33 | # DDNet log |
| 34 | date, time, level, line = line.split(" ", 3) |
| 35 | return cls(f"{date} {time}", level, line) |
| 36 | else: |
| 37 | # Rust log |
| 38 | datetime, level, line = line.split(" ", 2) |
| 39 | return cls(datetime.removeprefix("["), level, line.removeprefix(" ").replace("]", ":", 1)) |
| 40 | |
| 41 | def raise_on_error(self, timeout_id): |
| 42 | pass |
no outgoing calls
no test coverage detected