> ## Documentation Index
> Fetch the complete documentation index at: https://oxy.tech/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Debugging & Logs

<RewriteBanner />

## Debugging Oxygen CLI & Viewing Logs

Oxygen provides detailed logs to help you debug issues and understand what is happening under the hood.

### Enable Debug Logging

To see more detailed logs, set the `RUST_LOG` environment variable to `debug` when running any Oxygen CLI command:

```bash theme={null}
RUST_LOG=debug oxy run path/to/agent.agentic.yml "How many users do we have?"
```

You can use this with any Oxygen CLI command (e.g., `oxy run`, `oxy test`, `oxy build`, etc.).

### Where to Find Log Files

* **Most Oxygen CLI commands** (such as `oxy run`, `oxy test`, etc.) write logs to a file at:

  ```
  ~/.local/share/oxy/oxy.log
  ```

* **`oxy serve` command** logs directly to your terminal (stdout), so you can see logs in real time.

### Tips

* If you encounter an error or unexpected behavior, check the log file above for details.
* For persistent issues, always try running with `RUST_LOG=debug` to get more context.
* You can safely delete the log file if it grows too large; a new one will be created automatically.
