basemodo logs
Follow an App's Logs live, or print its last lines with --lines.
basemodo logs [OPTIONS]Logs are what the App's processes print and what its builds print, kept 7 days. Each line of the App's Machine names its Process: the one that printed it, or the one a notice of Basemodo's is about (basemodo when it is about none). Without --lines, --after, --before or --search the CLI follows them until interrupted; an agent gets the latest 100 lines and a cursor, follows by asking again with --after, and pages back with --before. --search finds the lines that mention a text, in any case, in all that is kept, newest matches first. A control character in a line (an escape, a carriage return) prints as \x1b or \x0d, so a line cannot drive your terminal; --json keeps every line exact.
Arguments
--app <APP>: The App whose Logs to read. Default: the one named after the current folder.--lines <N>: Print the last N lines and stop, instead of following.--after <CURSOR>: Print the lines after this cursor (of an earlier--jsonanswer, or of one of its lines) and stop.--before <CURSOR>: Print the lines before this cursor (an earlier--jsonanswer'solder_cursor, or one of its lines') and stop: paging back.--search <TEXT>: Print the newest lines that contain this text, in any letter case, from every kept line, and stop. With--before, the matches older than it.--process <NAME>(repeatable): Only the lines of this Process (web, a worker, a cron), with Basemodo's notices about it. Repeat it for several:--process web --process mailer.--source <app|build>: Only the App's Machine's lines (app) or only its builds' (build).
Like every command, it also takes the global options --json and --api-url.
Examples
Follow the Logs of the App of this folder (Ctrl-C to stop):
basemodo logsPrint the last 50 lines and stop:
basemodo logs --lines 50Print what is new since an earlier answer:
basemodo logs --after <cursor> --jsonPrint the lines before an earlier answer's oldest (its older_cursor):
basemodo logs --before <cursor> --jsonFollow only the worker mailer, with Basemodo's notices about it:
basemodo logs --process mailerPrint the last 100 lines of the builds:
basemodo logs --source build --lines 100Find the latest lines that mention a timeout, then older ones:
basemodo logs --search timeout --jsonbasemodo logs --search timeout --before <older_cursor> --jsonOutput
With --json, it prints {"lines": [{"at", "source", "deploy", "process", "message", "notice", "cursor"}], "cursor", "older_cursor", "retention_days", "processes": [{"name", "running"}]}, notice true for Basemodo's own lines (a crash, a restart, a cron run), older_cursor only when older lines are kept; while following, one JSON line per log line.
From an agent
Basemodo's MCP serves it as the tool logs. It only reads, so an agent's client may run it without asking you. Its arguments are the command's, named as JSON keys: app (text), lines (number), after (text), before (text), search (text), process (list of text), source (text). It answers what the command prints with --json.