mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
Improve printing further (#172)
* Improve pretty printing * Improve printing further
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user