diff --git a/Dockerfile b/Dockerfile index e731081..f59d2f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,6 @@ FROM base AS production COPY --from=builder /app/.venv /app/.venv ENV PATH="/app/.venv/bin:$PATH" -ENV ENVIRONMENT="prod" COPY src/ /app/src/ COPY configs/ /app/configs/ @@ -54,7 +53,6 @@ COPY --from=agent_api . /agent_api/ RUN uv pip install -e /agent_api/ ENV PATH="/app/.venv/bin:$PATH" -ENV ENVIRONMENT="dev" COPY Makefile ./ COPY .mk/ ./.mk/ diff --git a/configs/logging_test.yaml b/configs/logging_test.yaml new file mode 100644 index 0000000..fb5fcb7 --- /dev/null +++ b/configs/logging_test.yaml @@ -0,0 +1,29 @@ +version: 1 +disable_existing_loggers: false + +formatters: + test_formatter: + format: "%(asctime)s | %(correlation_id)s | %(levelname)-7s | %(name)s | %(message)s" + datefmt: "%Y-%m-%d %H:%M:%S" + +handlers: + console: + class: logging.StreamHandler + level: DEBUG + formatter: test_formatter + stream: ext://sys.stdout + filters: [correlation_filter] + +filters: + correlation_filter: + (): src.core.correlation.CorrelationFilter + +loggers: + src: + level: DEBUG + handlers: [console] + propagate: false + +root: + level: WARNING + handlers: [console] \ No newline at end of file diff --git a/src/agent/tools/execute_shell.py b/src/agent/tools/execute_shell.py index dee55c5..8fb02f4 100644 --- a/src/agent/tools/execute_shell.py +++ b/src/agent/tools/execute_shell.py @@ -66,12 +66,12 @@ def execute_shell( output = result.stdout if output: - logger.trace(f"Command output STDOUT: {output}") + logger.trace(f"Command output: {len(output)} characters on stdout") if result.stderr: + logger.debug("Command output errors on stderr") stderr_lines = result.stderr.strip().split("\n") output += "\n" + "\n".join(f"[stderr] {line}" for line in stderr_lines) - logger.debug(f"Command output STDERR: {result.stderr}") # Truncate if needed max_output = DEFAULT_MAX_OUTPUT