From 0ab5964642a3b760cf4ff69d4e89f982d3e0ca41 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 4 Dec 2025 14:14:46 +0000 Subject: [PATCH 1/2] fix: configure logging with basicConfig in autostart() The SDK's autostart() function was not configuring any logging handlers, which meant logs would not appear unless the caller explicitly configured logging beforehand. This fix adds logging.basicConfig() to ensure logs are visible out of the box. The previous code had dead code that expected init() to return a log handler, but init() always returns None. This has been cleaned up. Co-Authored-By: srith@agentuity.com --- agentuity/server/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/agentuity/server/__init__.py b/agentuity/server/__init__.py index 2d7acd5..7d0311c 100644 --- a/agentuity/server/__init__.py +++ b/agentuity/server/__init__.py @@ -695,14 +695,21 @@ def autostart(callback: Callable[[], None] = None): loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) + # Configure logging with a default handler if none exists + # This ensures logs are visible even if the caller doesn't configure logging + logging.basicConfig( + level=logging.INFO, + format="[%(levelname)-5.5s] %(message)s", + ) logger.setLevel(logging.INFO) + config_data, config_file = load_config() if config_data is None: logger.error(f"No required config file found: {config_file}") sys.exit(1) - loghandler = init( + init( { "cliVersion": config_data["cli_version"], "environment": config_data["environment"], @@ -721,9 +728,6 @@ def autostart(callback: Callable[[], None] = None): logger.error(f"No agents found in config file: {config_file}") sys.exit(1) - if loghandler: - logger.addHandler(loghandler) - # Create the web application app = web.Application() From 354b806ca585318aadc9db388b75b7ee77db8c69 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 4 Dec 2025 14:17:49 +0000 Subject: [PATCH 2/2] fix: restore loghandler wiring for test compatibility Co-Authored-By: srith@agentuity.com --- agentuity/server/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agentuity/server/__init__.py b/agentuity/server/__init__.py index 7d0311c..4cffcc6 100644 --- a/agentuity/server/__init__.py +++ b/agentuity/server/__init__.py @@ -709,7 +709,7 @@ def autostart(callback: Callable[[], None] = None): logger.error(f"No required config file found: {config_file}") sys.exit(1) - init( + loghandler = init( { "cliVersion": config_data["cli_version"], "environment": config_data["environment"], @@ -728,6 +728,9 @@ def autostart(callback: Callable[[], None] = None): logger.error(f"No agents found in config file: {config_file}") sys.exit(1) + if loghandler: + logger.addHandler(loghandler) + # Create the web application app = web.Application()