-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The new subcommands to fetch logs only return the most recent 100 log lines from a given context, application, request, container...
We could add two new flags for those subcommands to fetch more logs when users need them.
- Flag to fetch all logs,
--all: To do this, we'd need to add the parameterheadto the API call with the number of logs to fetch. This will return logs in ascending order. Then, we'll use thenextTokenreturned in the response to keep pulling logs until we receive a response withoutnextToken, meaning that we're consumed all the logs:
v1/namespaces/NAMESPACE/applications/APPLICATION/logs?head=100
- Flag to wait, or follow, logs,
--follow: This flag will make the cli to wait for incoming logs. Send the first logs request to the server, keep the UUID of the newest entry, sleep for a few seconds, and send the request again. If there are newer entries in the response, print them, and do the loop again.
diptanu
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request