Logs

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

On this page

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 tabs under the Logs heading pick which.

Stream Tab What it shows
Client console Client Browser console output from the page in the preview: your console.log, warnings and errors
API logs API Output from the tooling and the dev process in the preview machine, including the package manager and system messages
Preview server logs Preview Server side output from the preview build of your site
Production server logs Production Server side output from your published site
Publish logs Publish 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, then the message in a monospace face. The stream you picked already tells you where a line came from, so the line itself does not repeat it. 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.

The panel keeps only the most recent few hundred lines, counted across all five streams together, so it is not a full archive.

Actions

The three dots menu at the right end of the tabs 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. The same, on Publish logs
No logs Connected with nothing to show. The line underneath names what would appear there

Logs in chat

The chat in the editor reads three of these streams when you ask, for example why does my contact form fail on the live site? or why did the publish fail?: Preview server logs, Production server logs and Publish logs. It tells you what the lines mean in plain words rather than pasting them, and it never repeats a key, token or password it finds in them. It reads them for your request only, never on its own.

The server streams hold only what is in flight, so a read right after a quiet spell can come back nearly empty. Make the problem happen again, then ask.

It reads the Client console and API logs of the preview as well, along with the runtime errors the preview caught, when you report something broken or after a change that could break a page, see Seeing your preview. The Client console only has lines while someone has the preview open. You can still attach any line with the cursor icon to point it at one.

From an AI client over MCP

get_site_logs returns the same server lines this panel shows, for either the preview machine or production, and get_publish_logs returns the publish logs of one publish, a page at a time. Both need the logs:read scope, which is ticked by default.

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

Next