From 20893fc912c229256a4fa5cf63fb3864b7276a7d Mon Sep 17 00:00:00 2001 From: Davor Runje Date: Sat, 30 Mar 2024 01:15:39 +0100 Subject: [PATCH] replace iostream warning message with info (#2207) Co-authored-by: Chi Wang --- autogen/io/base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autogen/io/base.py b/autogen/io/base.py index db25560e0e82..ccdd1d1838fa 100644 --- a/autogen/io/base.py +++ b/autogen/io/base.py @@ -76,8 +76,10 @@ def get_default() -> "IOStream": """ iostream = IOStream._default_io_stream.get() if iostream is None: - logger.warning("No default IOStream has been set, defaulting to IOConsole.") - return IOStream.get_global_default() + logger.info("No default IOStream has been set, defaulting to IOConsole.") + iostream = IOStream.get_global_default() + # Set the default IOStream of the current context (thread/cooroutine) + IOStream.set_default(iostream) return iostream @staticmethod