View Logs

Page last updated:

Page last updated:

Cloud Foundry treats logs as streams of time-ordered events aggregated from the output streams of all your app and Cloud Foundry components, providing a single channel for all of the events.

View information about your running app using one of the logging commands, cf logs:

$ cf logs my-java-app
Connected, tailing logs for app my-java-app in org MyOrg / space MySpace as user@mydomain.com...

2016-05-29T15:58:44.80+0200 [RTR/0]      OUT my-random-hostname.scapp.io - [29/05/2016:13:58:44 +0000] "GET / HTTP/1.1" 200 0 83 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, lik
e Gecko) Chrome/50.0.2661.102 Safari/537.36" 85.4.61.216:58977 x_forwarded_for:"-" x_forwarded_proto:"http" vcap_request_id:7d4a0666-baa2-4513-44fa-54adea9fc874 response_time:0.172195463 app_id:a83336
14-5870-484b-b57b-a84bac0666f6
2016-05-29T15:58:46.08+0200 [RTR/0]      OUT my-random-hostname.scapp.io - [29/05/2016:13:58:46 +0000] "GET / HTTP/1.1" 200 0 83 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, lik
e Gecko) Chrome/50.0.2661.102 Safari/537.36" 85.4.61.216:58977 x_forwarded_for:"-" x_forwarded_proto:"http" vcap_request_id:3470b5dd-8f98-441d-5e4a-1c68e0964844 response_time:0.00505579 app_id:a833361
4-5870-484b-b57b-a84bac0666f6

Visit your application in the browser, to see log messages being generated.

Press Ctrl+C to stop streaming the logs.

You can use

$ cf logs my-java-app --recent

to get the most recent logs.

I’ve learned how to see my logs
View the source for this page in GitHub