diff --git a/backend/autometabuilder/app_runner.py b/backend/autometabuilder/app_runner.py index f4bb1df..0d77e65 100644 --- a/backend/autometabuilder/app_runner.py +++ b/backend/autometabuilder/app_runner.py @@ -3,7 +3,7 @@ import logging import os from .utils import parse_args from .loaders import load_env -from .logging_config import configure_logging +from .utils.logging_config import configure_logging from .loaders import load_metadata from .web.server import start_web_ui from .engine import load_workflow_config, build_workflow_context, build_workflow_engine diff --git a/backend/autometabuilder/utils/__init__.py b/backend/autometabuilder/utils/__init__.py index 79889e0..2d5de5e 100644 --- a/backend/autometabuilder/utils/__init__.py +++ b/backend/autometabuilder/utils/__init__.py @@ -5,6 +5,7 @@ This module contains various utility functions: - cli_args: CLI argument parsing - context_loader: Load SDLC context from repo and GitHub - docker_utils: Docker command utilities +- logging_config: Logging configuration with TRACE support - model_resolver: Resolve LLM model names - roadmap_utils: Roadmap file utilities - tool_map_builder: Build tool map from registry @@ -13,6 +14,7 @@ This module contains various utility functions: from .cli_args import parse_args from .context_loader import get_sdlc_context from .docker_utils import run_command_in_docker +from .logging_config import configure_logging from .model_resolver import resolve_model_name from .roadmap_utils import is_mvp_reached, update_roadmap from .tool_map_builder import build_tool_map @@ -21,6 +23,7 @@ __all__ = [ "parse_args", "get_sdlc_context", "run_command_in_docker", + "configure_logging", "resolve_model_name", "is_mvp_reached", "update_roadmap", diff --git a/backend/autometabuilder/logging_config.py b/backend/autometabuilder/utils/logging_config.py similarity index 100% rename from backend/autometabuilder/logging_config.py rename to backend/autometabuilder/utils/logging_config.py diff --git a/backend/autometabuilder/workflow/plugin_map.json b/backend/autometabuilder/workflow/plugin_map.json index 33aa86d..270d329 100644 --- a/backend/autometabuilder/workflow/plugin_map.json +++ b/backend/autometabuilder/workflow/plugin_map.json @@ -1,5 +1,6 @@ { "backend.build_tool_map": "autometabuilder.workflow.plugins.backend.backend_build_tool_map.run", + "backend.configure_logging": "autometabuilder.workflow.plugins.backend.backend_configure_logging.run", "backend.create_github": "autometabuilder.workflow.plugins.backend.backend_create_github.run", "backend.create_openai": "autometabuilder.workflow.plugins.backend.backend_create_openai.run", "backend.load_env": "autometabuilder.workflow.plugins.backend.backend_load_env.run", @@ -66,6 +67,11 @@ "string.split": "autometabuilder.workflow.plugins.string.string_split.run", "string.trim": "autometabuilder.workflow.plugins.string.string_trim.run", "string.upper": "autometabuilder.workflow.plugins.string.string_upper.run", + "test.assert_equals": "autometabuilder.workflow.plugins.test.test_assert_equals.run", + "test.assert_exists": "autometabuilder.workflow.plugins.test.test_assert_exists.run", + "test.assert_false": "autometabuilder.workflow.plugins.test.test_assert_false.run", + "test.assert_true": "autometabuilder.workflow.plugins.test.test_assert_true.run", + "test.run_suite": "autometabuilder.workflow.plugins.test.test_run_suite.run", "tools.create_branch": "autometabuilder.workflow.plugins.tools.tools_create_branch.run", "tools.create_pull_request": "autometabuilder.workflow.plugins.tools.tools_create_pull_request.run", "tools.list_files": "autometabuilder.workflow.plugins.tools.tools_list_files.run", @@ -83,10 +89,5 @@ "var.delete": "autometabuilder.workflow.plugins.var.var_delete.run", "var.exists": "autometabuilder.workflow.plugins.var.var_exists.run", "var.get": "autometabuilder.workflow.plugins.var.var_get.run", - "var.set": "autometabuilder.workflow.plugins.var.var_set.run", - "test.assert_equals": "autometabuilder.workflow.plugins.test.test_assert_equals.run", - "test.assert_true": "autometabuilder.workflow.plugins.test.test_assert_true.run", - "test.assert_false": "autometabuilder.workflow.plugins.test.test_assert_false.run", - "test.assert_exists": "autometabuilder.workflow.plugins.test.test_assert_exists.run", - "test.run_suite": "autometabuilder.workflow.plugins.test.test_run_suite.run" -} \ No newline at end of file + "var.set": "autometabuilder.workflow.plugins.var.var_set.run" +} diff --git a/backend/autometabuilder/workflow/plugins/backend/backend_configure_logging.py b/backend/autometabuilder/workflow/plugins/backend/backend_configure_logging.py new file mode 100644 index 0000000..8686fcb --- /dev/null +++ b/backend/autometabuilder/workflow/plugins/backend/backend_configure_logging.py @@ -0,0 +1,18 @@ +"""Workflow plugin: configure logging.""" +from ....utils.logging_config import configure_logging + + +def run(_runtime, _inputs): + """ + Configure logging with TRACE support. + + Sets up logging with: + - Custom TRACE level (level 5) + - File and console handlers + - Configurable log level from LOG_LEVEL env var + + Returns: + dict: Success indicator + """ + configure_logging() + return {"result": "Logging configured"}