# Logs

Source: https://modulify.ai/docs/editor/logs

The five log streams the editor shows and what lands in each.

The Logs tab collects output from your site while it runs, in the preview and in production, plus the output of publishing. It lives behind **More** in the tab strip: click **More**, then **Logs**.

## The five streams

One stream is shown at a time. The dropdown in the panel header picks which.

| Stream | What it shows |
|---|---|
| Client Console | Browser console output from the page in the preview: your `console.log`, warnings and errors |
| API Logs | Output from the tooling and the dev process in the preview machine, including the package manager and system messages |
| Preview Server Logs | Server side output from the preview build of your site |
| Production Server Logs | Server side output from your published site |
| Publish Logs | Output from publishing runs |

Your choice is remembered, and the stream is part of the address, so `/logs/production-server` reopens on production output.

## Reading a line

Each line is one entry: the time in `HH:mm:ss`, the source it came from in a colour of its own, then the message. Errors are red and warnings are yellow. Long lines wrap rather than scroll sideways.

Hover a line for two buttons. The cursor icon attaches that line to chat as a **Log** chip, so you can ask for a fix without copying anything. The copy icon copies the line.

The list follows new output while you are at the bottom. Scroll up and a jump to bottom button appears.

## Actions

The three dots menu in the header holds:

- **Copy all logs**, which copies everything currently shown
- **Export as .txt**, which downloads the current stream as a text file
- **Clear logs**, which empties the stream you are looking at and leaves the others alone

All three are disabled when the stream is empty.

## Run JavaScript in the preview

On **Client Console** only, an input sits at the bottom of the panel, placeholded `Run JavaScript...`. What you type is evaluated inside the preview page and echoed into the stream prefixed with `>`. It appears once the preview is running.

## Empty and waiting states

| What you see | What it means |
|---|---|
| `Waiting for server` with `Streaming starts once the server is running.` | The preview or the connection behind that stream is not up yet |
| `Fetching logs` with `Recent server output appears here shortly.` | Connected, and recent output is being loaded |
| `Checking logs` with `Publishing output appears here in a moment.` | The same, on Publish Logs |
| `No logs` | Connected with nothing to show. The line underneath names what would appear there |


## From an AI client over MCP

`get_site_logs` returns the same server lines this panel shows, for either the `preview` machine or `production`. It needs the `logs:read` scope, which is ticked by default.

The Client Console tab has no MCP equivalent, because those lines come from the browser running the preview rather than from the server.
## Next

- [Files and code](/docs/editor/files-and-code) is where you read the source behind a log line.
- [Use the preview](/docs/editor/preview) covers the runtime error overlay and Fix with AI.