Logs
See what your app's code did: each request, what it printed, and what crashed. Kept 7 days.
Every app with compute keeps logs of what its code did:
- A line per request: the method, the path, the status it answered with, how long it took, and how the run ended (for example "Crashed" or "Ran out of processing time").
- What the code printed:
console.log,console.info,console.warn,console.errorandconsole.debug, each with its level. - Crashes: errors the code didn't catch, with their stack.
- Scheduled runs, when your code has them.
Lines are kept 7 days. Logs cost nothing.
In the dashboard
Open the app and choose Logs. Newest lines are at the top, and Live adds new ones as they happen. Search messages and stacks, show only warnings and errors, or only requests, printed lines or crashes. Click a crash to see its stack.
Secrets stay out
Before a line is stored, opencloudport takes out what shouldn't be there:
- Request headers are never kept, so
Authorizationand cookies never reach the logs. - Query values with names like
token,key,secret,password,signatureorcodeare blanked:/orders?token=[redacted]&page=2. - Inside printed messages, bearer tokens, cookies, passwords, opencloudport keys, Stripe secret keys and GitHub tokens are blanked.
Still, don't print secrets on purpose: blanking catches common shapes, not everything.
From the API
curl "https://opencloudport.com/api/v1/apps/$APP_ID/logs?level=warn&limit=50" \
-H "authorization: Bearer $OCP_KEY"| Query | |
|---|---|
since, until | ISO times. Default: everything kept. |
level | The lowest level shown: debug, info, warn or error. warn shows warnings and errors. |
kind | request (request lines and scheduled runs), console (printed lines) or exception (crashes). |
search | Words to look for in messages and stacks. |
limit | 1 to 500, default 100. |
cursor | Older lines: pass the next_cursor from the page before. |
after, wait | Follow along: lines newer than this id, oldest first. after=latest starts from now. wait (up to 20 seconds) holds the request until there's something new. |
Newest first, each line like:
{
"id": 1042,
"at": "2026-10-22T09:14:03.120Z",
"run_id": "6f1c…",
"kind": "request",
"level": "error",
"message": "GET /boom",
"method": "GET",
"path": "/boom",
"status": null,
"duration_ms": 3,
"outcome": "exception"
}Lines from one run share a run_id, so you can find what a request printed. exception lines also have a stack.
To follow along from a script, ask with after=latest&wait=20, then keep asking with the after each answer gives back:
let after: number | 'latest' = 'latest'
for (;;) {
const page = await ocp.app(appId).logs.follow(after)
for (const line of page.data) console.log(line.at, line.level, line.message)
after = page.after
}ocp.app(appId).logs.list({ level: 'error', since }) reads a page, newest first.
For agents
The MCP tool get_logs reads an app's recent lines as short text, oldest first, with the same filters. It's read-only, so agents don't need to ask before using it.
Limits
- At most 2,000 lines per app per hour are kept. Past that, one line says some were left out, until the hour has passed.
- At most 100 printed lines per run; messages and stacks past 8,000 characters are cut short.
- A key scoped to an app can read that app's logs.
opencloudport