Compare commits

..

No commits in common. "c9909e4bd5" and "cf3a462ee1" have entirely different histories.

3 changed files with 31 additions and 4 deletions

View file

@ -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/

29
configs/logging_test.yaml Normal file
View file

@ -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]

View file

@ -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