astroctl application logs
Get application logs
Synopsis
Get application logs with optional pod selection
Terminal
astroctl application logs [application-name] [flags]
Examples
Terminal
# Get the application log (interactive pod selection)
astroctl app logs myapp
# Get logs from a specific pod
astroctl app logs myapp --pod my-pod-name
# Get logs from a specific container in a pod
astroctl app logs myapp --pod my-pod-name --container my-container
# Get the application log and follow
astroctl app logs myapp -f
# Get the application log and show 100 lines from the end
astroctl app logs myapp -t 100
# Get the application log and show previous logs
astroctl app logs myapp -p
# Get logs with structured output
astroctl app logs myapp -o yaml
astroctl app logs myapp -o json
# Errors and warnings from the last 30 minutes, 2 lines of context each, the crashed container's included
astroctl app logs myapp --since 30m --level Warning --include-previous
# Everything since a point in time
astroctl app logs myapp --since-time 2026-09-28T14:00:00Z
# List available pods for an application (kubectl style)
astroctl app logs myapp --list-pods
# Follow logs with custom timeout (default: 5 minutes when following)
astroctl app logs myapp -f --timeout 10
Options
Terminal
--container string specific container name within the pod
--context int lines kept around each matching line when --level is set (default 2)
-f, --follow continuously follow the log of the application (default true)
-h, --help help for logs
--include-previous when the container has restarted, read the crashed container's log first
--interactive enable interactive pod selection (default true)
--level string only lines at this severity and above, with context: Error or Warning
--list-pods list available pods and exit (kubectl style)
-o, --output string Output format (clean|json|yaml) (default "clean")
--pod string specific pod name to get logs from
-p, --previous show previous log
--since string only lines newer than this duration, e.g. 30m or 2h
--since-time string only lines from this RFC 3339 time on
-t, --tail int number of lines to show from the end of the log
--timeout int Connection timeout in minutes for follow mode (default: 5) (default 5)
Options inherited from parent commands
Terminal
-n, --name string name of the application
SEE ALSO
- astroctl application - Manage applications