Improve printing further (#172)

* Improve pretty printing

* Improve printing further
This commit is contained in:
gagb
2024-07-02 18:09:45 -07:00
committed by GitHub
parent e0065cab42
commit 9df928b73e
3 changed files with 9 additions and 15 deletions

View File

@@ -89,7 +89,10 @@ class MyHandler(logging.Handler):
def emit(self, record: logging.LogRecord) -> None:
try:
if isinstance(record.msg, OrchestrationEvent):
print(record.msg.message, flush=True)
print(f"""---------------------------------------------------------------------------
\033[91m{record.msg.source}:\033[0m
{record.msg.message}""", flush=True)
except Exception:
self.handleError(record)