configure_debug_logging(
target: logging.Logger,
) -> None| Name | Type | Description |
|---|---|---|
target* | logging.Logger | Logger to configure. |
Attach a file handler to target when DEEPAGENTS_CODE_DEBUG is set.
Intended to be called once on the deepagents_code package logger; child
module loggers reach the same file via propagation, so individual modules do
not configure logging themselves.
The log file defaults to '/tmp/deepagents_debug.log' but can be overridden
with DEEPAGENTS_CODE_DEBUG_FILE. The handler appends (mode='a') so logs
are preserved across separate process runs. Calling this again with the same
resolved path is a no-op: the existing tagged handler is reused rather than
stacking duplicates. If the resolved path changes, the stale handler is
closed and replaced.
Does nothing when DEEPAGENTS_CODE_DEBUG is not truthy (see is_env_truthy).