Read daemon logs
logsRead recent TSLink daemon log entries to diagnose failures when status and doctor are insufficient, redacting credentials, login URLs, and email addresses.
Instructions
Read recent lines from the local TSLink daemon log. Use this when status and doctor did not explain a failure and the daemon's own account of what happened is needed; it opens the local log file read-only, returns a recent window rather than the whole file, and redacts credential material, Tailscale login and invitation URLs, and email addresses before returning anything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| last | No | Maximum number of lines to return, counted from the newest. | |
| level | No | Minimum producer log level. Omitting it returns every level. | |
| since | No | Duration such as 15m, 6h or 2d bounding how far back to read (Go syntax, plus d for days); defaults to 1h and may not exceed 7d (168h). Widen it only after the default window came back empty. | |
| source | No | err is the structured application log and is almost always the one wanted; out is the daemon's stdout. | err |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| count | Yes | ||
| level | No | ||
| lines | Yes | ||
| since | Yes | The requested window as a duration. | |
| source | Yes | ||
| matched | Yes | Lines passing the level and time filters before the line and byte bounds; compare with count to see how much was cut. | |
| redacted | Yes | Constant true. Credential material, Tailscale login and invitation URLs, and email addresses are replaced before the lines are returned, so they are not byte-identical to the file on disk. | |
| since_at | Yes | Absolute cutoff the window resolved to, in the daemon's clock. | |
| truncated | Yes | True when lines is not the whole of what matched. | |
| truncated_reason | No | Which bound cut the answer: line_limit is the last argument, byte_limit is the response size ceiling. |