Skip to content

Conversation

@wjordan
Copy link
Contributor

@wjordan wjordan commented Jul 29, 2025

GetLogs fetches logs from either a specific Machine or (if the machineID == "") an entire App, using the flaps client.

Because the API response is newline-delimited JSON, this PR also includes a wrapper function (ndjson.Wrap) that transforms an io.ReadCloser response into a standard JSON Array that can be decoded directly into a slice.

The structure of each log lines is AppLogEntry which is the same format as NATS app-log messages (extracted from the flyctl repo).

fetch logs from a Machine or App using the flaps client.
Add an io.Reader wrapper to transform the newline-delimited JSON response
into a JSON Array that can be decoded directly into a slice.
wjordan added a commit to superfly/flyctl that referenced this pull request Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants