# configure_debug_logging

> **Function** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/_debug/configure_debug_logging)

Attach a file handler to *target* when `DEEPAGENTS_CLI_DEBUG` is set.

The log file defaults to `'/tmp/deepagents_debug.log'` but can be overridden
with `DEEPAGENTS_CLI_DEBUG_FILE`. The handler appends so that multiple
modules share the same log file across a session.

Does nothing when `DEEPAGENTS_CLI_DEBUG` is not set.

## Signature

```python
configure_debug_logging(
    target: logging.Logger,
) -> None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `target` | `logging.Logger` | Yes | Logger to configure. |

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/b710a69b12e49479045eaa54dfb709326473500b/libs/cli/deepagents_cli/_debug.py#L18)