> For the complete documentation index, see [llms.txt](https://docs.contextual.io/documentation-and-resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.contextual.io/documentation-and-resources/tenants/monitoring/logs.md).

# Logs

The Logs view lets you search and filter historical log activity across your tenant.

## Where to Find It

Under **Monitoring** in the left navigation, select **Logs**.

## How It Works

* **Agents** - Filter logs by one or more agents.
* **CLQL editor** - Enter a query using Contextual Log Query Language (CLQL), then press Enter or click **Search**.
* **Time Range** - Choose a search window (for example, Last 24 hours or Last 30 Days). The selected range limits the query; it does not extend log retention.
* **Messages / Sessions tabs** - Toggle between message-level logs and session-level logs.

Tenant log retention is configured as 1, 7, or 30 days, with the 1-day tier used as the provisioning fallback/default. Search results are bounded by the tenant's retained history. Selecting a range longer than that history cannot return expired logs.

The editor includes a direct link to the CLQL docs for query syntax guidance.

## Tips

* Use **Columns** to show or hide fields in the results grid.
* Use **Filters** for quick table filtering after a query runs.
* Use **Export** to download results for offline analysis.

For CLQL details, see [Contextual Log Query Language (CLQL)](/documentation-and-resources/tenants/tenant-logs/contextual-log-query-language-clql.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.contextual.io/documentation-and-resources/tenants/monitoring/logs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
