mirror of https://github.com/microsoft/autogen.git
Improve pretty printing (#171)
This commit is contained in:
parent
bcec0502d7
commit
e0065cab42
|
@ -89,7 +89,7 @@ class MyHandler(logging.Handler):
|
|||
def emit(self, record: logging.LogRecord) -> None:
|
||||
try:
|
||||
if isinstance(record.msg, OrchestrationEvent):
|
||||
print(f"[{record.msg.timestamp}]: {record.msg.message}", flush=True)
|
||||
print(record.msg.message, flush=True)
|
||||
except Exception:
|
||||
self.handleError(record)
|
||||
|
||||
|
|
|
@ -35,11 +35,10 @@ class RoundRobinOrchestrator(TypeRoutedAgent):
|
|||
logger.info(
|
||||
OrchestrationEvent(
|
||||
current_timestamp,
|
||||
f"""
|
||||
-------------------------------------
|
||||
{source}: {message.content.content}
|
||||
-------------------------------------
|
||||
""",
|
||||
f"""{source}:
|
||||
|
||||
{message.content.content}
|
||||
-------------------------------------""",
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -54,7 +53,10 @@ class RoundRobinOrchestrator(TypeRoutedAgent):
|
|||
logger.info(
|
||||
OrchestrationEvent(
|
||||
current_timestamp,
|
||||
f"Orchestrator (thought): Next speaker {next_agent.metadata['name']}",
|
||||
f"""Orchestrator (thought):
|
||||
|
||||
Next speaker {next_agent.metadata['name']}
|
||||
-------------------------------------""",
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue