(self, record: logging.LogRecord)
| 114 | """Formatter for non-colored logging in files.""" |
| 115 | |
| 116 | def format(self, record: logging.LogRecord) -> str: |
| 117 | # Create a deep copy of the record to avoid modifying the original |
| 118 | new_record = _fix_record(record) |
| 119 | |
| 120 | # Strip ANSI color codes from the message |
| 121 | new_record.msg = strip_ansi(new_record.msg) |
| 122 | |
| 123 | return super().format(new_record) |
| 124 | |
| 125 | |
| 126 | def strip_ansi(s: str) -> str: |