> ## Documentation Index
> Fetch the complete documentation index at: https://docs.marina.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Logs and debugging

> Read what your app did in production: requests, console output, and errors.

Every deployed app records structured logs. Read them from the CLI:

```bash theme={null}
marina logs                      # latest entries for the linked app
marina logs --app expenses
marina logs --level error        # debug, info, log, warn, or error
marina logs --limit 200
marina logs --cursor <cursor>    # continue from a previous result
```

The same entries appear in the dashboard on the app's **Logs** page.

## What gets captured

| Kind | Contents |
| - | - |
| Invocations | One entry per handled request: method, path, response status, and outcome. |
| Console | Everything your code writes with `console.log`, `console.warn`, and friends, tagged with its level. |
| Exceptions | Uncaught errors, with the error name and message. |
| Egress | Every allowed or blocked outbound attempt: destination hostname, method, status, and outcome. |
| Deployments | Version publishes and rollbacks, so traffic changes line up with code changes. |

Entries are ordered, carry timestamps, and reference the invocation they
belong to, so a request's console output and its outcome read together. Very
long messages are truncated and marked as such.

## Debugging a failing request

1. Reproduce the request and note the approximate time.
2. `marina logs --level error` to find the exception or failed invocation.
3. Widen to `marina logs` around the same invocation to see the console
   output leading up to it.

For machine processing, add `--json`: results arrive as one JSON document on
standard output, including the cursor for the next page.

## What not to log

Log lines are visible to everyone who can see the app. Do not write secrets,
credentials, tokens, or raw personal data to the console. Marina never adds
request bodies or database values to logs on its own. Egress audit entries
exclude URL paths, queries, headers, bodies, and secret values.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.