get_logs
Fetch the tail of a detached local ComfyUI server's captured log output. Pass an explicit port to read the correct instance's log file, particularly after a crash.
Instructions
Return the tail of the LOCAL background ComfyUI's captured log file.
Wraps comfy logs --tail <tail> — reads comfy-cli's persisted
stdout/stderr file, the only way to see a detached server's output.
Returns {lines, path, truncated}.
Args: port: force WHICH log file is read. Pass it whenever more than one ComfyUI/port has run here, and always after a crash — no running process is left to infer the port from, so an unqualified call can hand back a different instance's log.
A newer comfy-cli also reports source (explicit_port/recorded
are trustworthy, anything else is a guess) and port_mismatch (served
file is a different port than the running server). If either signals
doubt, don't trust the lines — retry with an explicit port.
No log file yet returns {"error": "no_log_file", ...} as DATA, not a
raised error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ||
| tail | No |