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

# Logs

> See what your agent printed and what happened on every call: time ranges, levels, search, live tail, and what is and is not logged.

The agent's **Logs** tab shows everything your agent wrote, and what Onecortex did around it, for the last 14 days. It is where you find out why a call failed.

## Read the logs

* **Time range**: the last 15 minutes, hour, 24 hours or 7 days, or a custom range. The last hour is the default.
* **Level**: all levels, or one of `debug`, `info`, `warn`, `error` and `unknown`.
* **Search logs**: text to match in the lines.
* **Live tail**: new lines as they arrive. If live tail is not available, the tab says `Live tail unavailable, showing recent logs`.

A multi line entry, such as a traceback, is shown as one entry.

## What your agent writes

Anything your agent prints is logged, with its level:

| You write | Level |
| - | - |
| Python `print(...)`, or anything on standard output | `info`, labelled `INFO:` |
| Python `logging`, and tracebacks, on standard error | The level the line itself says |
| `console.log` and `console.info` | `info` |
| `console.warn` | `warn` |
| `console.error` | `error` |
| `console.debug` | `debug` |
| A line that already starts with a level, such as `ERROR:` or `[warn]`, or a JSON line | Kept as written |

A line Onecortex cannot read a level from is `unknown`, never assumed to be `info`, so the level filter never hides one.

An exception your agent raises during a call is logged with its full traceback. The caller gets only its type and message. See [Errors](/production/errors#agent_error).

## What Onecortex writes

Lines that come from the runtime rather than from your code are marked as platform lines, so you can tell them apart from your own.

## Input and output logging

By default, the prompts your agent receives and the replies it sends are also captured in its logs. The tab says so: **Agent logs include the inputs and outputs your agent processes**.

To stop capturing them, turn on **Disable input/output logging** on the agent's **Settings** tab. What your agent prints is still logged either way. The change takes effect on the agent's next deployment: with automatic deploys on, saving it redeploys. Lines from before are kept for their 14 days.

## What is never logged

* Secret values. They go straight to encrypted storage, and nothing in Onecortex can read them back.
* Your API keys.

What your own code prints is yours: if it prints a secret, the secret is in the logs.

## Retention

Logs are kept for **14 days**, then deleted. Deleting an agent deletes its logs at once.
