Instance logs
The Gateway returns the end of an Instance’s application log. The application writes this file itself, so it shows errors that a Process log does not. Processes and schedules and Schedules describe the other logs.Read the log
GET /api/v1/instances/{instance}/logs returns the end of the log as one newline-separated string in data.logs. lines sets the number of lines from 1 through 1,000, and the default is 100. The response also names the Instance in data.id and data.name and repeats data.lines. The read does not stream, so the Gateway refuses follow. It returns at most 4 MiB of the newest lines. When the lines asked for are larger, it returns fewer, and never a line cut at its start.
The web app shows this log on the Instance page. orbit instance:logs returns it in the terminal, and the PHP SDK sends the same request.
Follow the log live
A viewer can follow the log as the application writes it with a live log stream. The Node agent reads the same file with the same rules, and the Gateway relays new lines to that viewer only. The web app’s log pane andorbit instance:logs --follow use a stream. When the Gateway cannot open one, they fall back to this one-shot read.
Know which file the Gateway reads
The Gateway reads one file understorage/logs in the Instance’s application directory, which is the Laravel convention. Root apps/site/public means <checkout>/apps/site/storage/logs in development or <production-home>/current/apps/site/storage/logs in production. Root public keeps storage/logs at the checkout or release root. One-shot reads and live streams use the same directory.
An Instance without either file has an empty log, and the request still succeeds. The caller never names a path. The Gateway reads only a regular file that sits directly in
storage/logs, and it skips a symbolic link, so a link in the checkout cannot point the read at another file.
Know what the Gateway redacts
The Gateway replaces each stored environment value of the Instance with[REDACTED] before it returns the log. It skips a value shorter than eight characters, because a short value such as local or true is an ordinary word and would blank the log. It also skips the values of an exact list of Laravel setting keys, such as APP_ENV and LOG_CHANNEL, so production in production.INFO stays readable. Live logs lists the keys. A secret under any other key, such as LOG_SLACK_WEBHOOK_URL, is redacted. The Gateway then applies the same secret patterns that it applies to Process logs.
The log can still contain data that the application wrote on purpose, such as an email address in an exception message. Node access decides who may read it: the caller needs access to the Node that owns the Instance.