> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: About Logs in Studio Two

## Article: About Logs in Studio Two

## Article Link: https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/about-logs-in-studio-two.md

## Article Content:

# About Logs in Studio Two

Logs show what your site's code does while it runs. Your code writes log entries with the Wix [monitoring client](https://dev.wix.com/docs/sdk/core-modules/essentials/monitoring.md), and you read them on the Logs page in the site dashboard. Use log entries to see what your backend did for a request, check values while you debug, and find errors that visitors hit.

<blockquote class="important">

__Important:__
`console.log()` and the other `console` methods don't write to the Logs page in the site dashboard. Code that runs in the browser still prints `console` output to the browser's developer tools, but that output isn't saved as a log entry. To create a log entry, call the monitoring client from `@wix/essentials`. See [Write Log Messages in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/write-log-messages.md).

</blockquote>

## What gets logged

Your site's logs contain:

- **Entries your code writes.** Your code writes log entries with the monitoring client. An entry can be a message at a severity level, such as a warning, or an error your code caught. Either kind can include extra details, such as an order ID.
- **Uncaught backend errors.** When backend code throws an error that it doesn't catch, Wix logs the error automatically.

Nothing else is logged. Wix doesn't capture `console` output, or uncaught errors in code that runs in the browser. To record a browser error, your code needs to catch it and log it. `console` output from code in the browser appears in the browser's developer tools. `console` output from backend code isn't shown anywhere.

Because Wix logs nothing else, your logs don't fill up with output you didn't mean to record.

## Which code can write logs

You can write log entries with the monitoring client, not with `console`, from:

- Backend code, such as HTTP endpoints, event handlers, and service plugins.
- Code in site extensions that runs in the visitor's browser, such as an Editor React Component (ERC).

Code in dashboard pages can't write log entries.

Backend code writes log entries both in Preview and on the live site. Code that runs in the visitor's browser writes log entries only on the live site. Entries from Preview and from the live site appear together on the Logs page. Nothing in an entry shows whether it came from Preview or the live site.

## Where to view logs

The Logs page is in the site dashboard under **Developer Tools > Logs**. You can also open it from the Studio Two editor. Open the **Code** tab, click **Developer Tools** on the left edge, and select **Logs**.

On the Logs page, you can watch entries arrive live or review earlier entries, filter by severity, search, and open an entry's full details as JSON. See [View Logs in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/view-logs.md).

## How long logs are kept

Wix keeps log entries for 24 hours, and doesn't sample or limit them. To keep them longer, or to analyze them in another tool, [forward them to an OpenTelemetry endpoint](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/forward-logs-to-an-open-telemetry-endpoint.md).

## Who can view logs

A Wix user can view a site's logs if they own the site, or if their collaborator role includes access to developer tools.

## Logs and related tools

The following table compares Logs with the other tools that show or send data about your site's code:

| Tool | Where | What it shows |
|---|---|---|
| Logs | Site dashboard, **Developer Tools > Logs** | Entries your site's code writes while it runs, plus uncaught backend errors |
| Monitoring | Site dashboard, **Developer Tools > Monitoring** | Request counts, error rates, and response times for your backend endpoints |
| Signal Forwarding | Site dashboard, **Developer Tools > Signal Forwarding** | Endpoints that receive copies of your logs and traces. Traces record your backend requests and how long each one took. |
| WIX LOGS panel | Bottom of the **Code** tab | Messages from the development environment, such as build and sync activity. Doesn't show your site's runtime logs or `console` output. |

## See also

- [Write Log Messages in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/write-log-messages.md)
- [View Logs in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/view-logs.md)
- [Log Entry Structure in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/log-entry-structure.md)
- [Forward Logs to an OpenTelemetry Endpoint in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/forward-logs-to-an-open-telemetry-endpoint.md)