kf logs - Show logs for an App.
kf logs APP_NAME [flags]
Logs are streamed from the Kubernetes log endpoint for each running App instance.
If App instances change or the connection to Kubernetes times out the log stream may show duplicate logs.
Logs are retained for App instances as space permits on the cluster, but will be deleted if space is low or past their retention date. Cloud Logging is a more reliable mechanism to access historical logs.
If you need logs for a particular instance use the
# Follow/tail the log stream kf logs myapp # Follow/tail the log stream with 20 lines of context kf logs myapp -n 20 # Get recent logs from the App kf logs myapp --recent # Get the most recent 200 lines of logs from the App kf logs myapp --recent -n 200 # Get the logs of Tasks running from the App kf logs myapp --task
help for logs
Show the last N lines of logs. (default 10)
Dump recent logs instead of tailing.
Tail Task logs instead of App.
These flags are inherited from parent commands.
Username to impersonate for the operation.
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
Path to the Kf config file to use for CLI requests.
Path to the kubeconfig file to use for CLI requests.
Log HTTP requests to standard error.
Space to run the command against. This flag overrides the currently targeted Space.