(self, record: LogRecord)
| 254 | """ |
| 255 | |
| 256 | def format(self, record: LogRecord) -> str: |
| 257 | if hasattr(record, "color"): |
| 258 | record.title_color = ( |
| 259 | getattr(record, "color") |
| 260 | + getattr(record, "title", "") |
| 261 | + " " |
| 262 | + Style.RESET_ALL |
| 263 | ) |
| 264 | else: |
| 265 | record.title_color = getattr(record, "title", "") |
| 266 | |
| 267 | # Add this line to set 'title' to an empty string if it doesn't exist |
| 268 | record.title = getattr(record, "title", "") |
| 269 | |
| 270 | if hasattr(record, "msg"): |
| 271 | record.message_no_color = remove_color_codes(getattr(record, "msg")) |
| 272 | else: |
| 273 | record.message_no_color = "" |
| 274 | return super().format(record) |
| 275 | |
| 276 | |
| 277 | def remove_color_codes(s: str) -> str: |
nothing calls this directly
no test coverage detected