Skip to main content
Every line a function logs (console.debug, console.info, console.log, console.warn, console.error) becomes a fact in the system table sys.logs, after the execution settles, whether it committed or refused. A log line is read like any other fact, with the read verbs, and is governed by labels and grants like any other fact: each line carries the label its execution ran at, so a reader sees only the lines its label clears. Each line holds:
  • execution: the run it belongs to. Every line of one run shares it.
  • line: its position in the run, from 0.
  • function: the tree path of the function that ran.
  • component: the logging function’s component path (empty for the Root).
  • level: debug, info, log, warn or error.
  • message: the logged values, joined by spaces.
  • code and reason: the refusal code and reason the run ended with (a host code such as Conflict or Forbidden, an app code from the function’s refuses, or Failed), or null when it ended ok.
  • at: the instant it was logged.
  • version: the line’s commit-order cursor (ctx.page(sys.logs.by("version"), { size, cursor })).
Lines are kept for 14 days. Logs are not returned to the caller of a function: read them from sys.logs.

Read logs from the CLI

Read a bounded selection of sys.logs, newest first:
bijection dev tails the same lines on its own output.

Read logs from code

A query reads sys.logs like any table, newest first and bounded:
sys.logs is read-only to the six writes: a data write to it refuses Disallowed (SysReadOnly).

Export logs

To send logs to an external service, place a log export installation. It reads the lines its label clears from sys.logs and delivers them in batches to an OpenTelemetry receiver or a signed webhook.

Find a request’s logs

When a call fails, its refusal names the request. Every line of that run shares one execution, so read its lines with bijection list sys.logs --where function=<path> --first 50 and match the execution, or filter sys.logs in a query.