# Logs

Use **Logs** to search the log records of your services across environments, find the error you are looking for, and read its stack trace.

## Before you search {#access}

Log search runs with your own access to the log system (Graylog or Elasticsearch). There is no shared fallback. If you have not set it up, the page shows: "Log search works with your personal access. Set it in «My settings»." Press **Open «My settings»** and enter your access. The steps are in [My settings](my-settings#log-access).

> Logs may contain personal data. Only filtered records are shown (up to 500). Export and downloading whole files are not allowed.

Log sources (which system holds the logs of which service) are set up by an administrator. Users can look at the list and click a source to use it.

## Open Logs and set the filters {#filters}

Open **Logs** in the main menu. The page searches right away with your default filters. Change them above the results:

- **Environments**: choose one or more. This is a filter of this page, not a global setting.
- **Services**: choose one or more, or leave it empty for all.
- **Level from**: **Debug**, **Info**, **Warning** or **Error**. The default is **Error**, which shows errors only.
- **Period**: **15 min**, **1 h**, **24 h**, **Today**, **Yesterday**, **7 days** or **Custom…**. For **Custom…** choose the start and the end, then press **Apply**.
- **Source**: **Auto**, **Graylog**, **Elastic** or **File**. Leave it on **Auto** unless you know why you need another.
- **Search the logs**: type an order id, a document number, a class name or any text.

Level, period and source apply at once. Environments and services apply when you close their list. Text applies when you press Enter or **Search**.

> The address of the page keeps your filters, so you can share a link to the search you made.

## Read the results {#results}

Below the filters you see the number of records found and when the list was last updated. The newest records are on top. The footer says how many are shown (the limit is 500).

- The bars **Records by level** count the records by level. Click a level to show only those records. **All** shows everything again.
- The chart **Records over time** shows when records appeared. Click a bar to narrow the period to it. **Clear the narrowed period** brings the full period back.
- The table has the columns **Time**, **Level**, **Message** and the logger name. The text you searched for is highlighted.

If nothing matches, you see "No records match these filters." Press **Widen the period to 24 h** or **Clear the term**.

The button **Open in …** takes you to Graylog or Kibana with the same query, when the source gives a link.

## Read a stack trace {#stack-trace}

Click a row to open the full message. If the record has an exception, you see **Exception stack trace:** under it. Multi-line stack traces are joined into one record, so you do not have to find the pieces.

Use **Copy message** or **Copy stack trace** to paste it into a bug report.

## Follow new records {#live}

The **Live** switch refreshes the search every 10 seconds with the same filters. The caption says when the next refresh comes. Live pauses while a record is open. Press **Resume** to continue. It also pauses when personal access is needed.

## Logs from a service page {#from-service}

Open a service in [Services and health](services), then open its **Logs** tab. It shows the latest records of that service on the selected environment, using your default level and period from [My settings](my-settings#log-access). **Refresh** reloads them. **All logs ↗** opens this page with the service and environment already chosen.

If a search fails or gives nothing, check three things: the environment, the period (the default is short), and your personal access in [My settings](my-settings#log-access).
