-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogs.html.md.erb
34 lines (23 loc) · 1.79 KB
/
logs.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
title: View Logs
owner: Tobias Fuhrimann
---
<strong><%= modified_date %></strong>
<%= vars.product_short %> treats logs as streams of time-ordered events aggregated from the output streams of all your app and <%= vars.product_short %> components, providing a single channel for all of the events.
View information about your running app using one of the logging commands, `cf logs`:
<pre class="terminal">
$ cf logs my-go-app
Connected, tailing logs for app my-go-app in org MyOrg / space MySpace as user@mydomain.com...
2016-04-22T15:57:13.48+0200 [RTR/1] OUT my-random-hostname.scapp.io - [22/04/2016:13:57:13 +0000] "GET / HTTP/1.1" 200 0 22 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 178.197.231.93:46918 x_forwarded_for:"-" x_forwarded_proto:"http" vcap_request_id:2293d02c-79b7-4c73-50b6-06e5b90e3788 response_time:0.00192374 app_id:5bc25f0e-48f4-41f0-9ea1-d01e643edf0d
2016-04-22T15:57:14.24+0200 [RTR/1] OUT my-random-hostname.scapp.io - [22/04/2016:13:57:14 +0000] "GET /favicon.ico HTTP/1.1" 200 0 22 "http://my-random-hostname.scapp.io/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 178.197.231.93:46918 x_forwarded_for:"-" x_forwarded_proto:"http" vcap_request_id:8406bde9-b3cd-454b-4ff3-7fd609b16807 response_time:0.001859053 app_id:5bc25f0e-48f4-41f0-9ea1-d01e643edf0d
</pre>
Visit your application in the browser, to see log messages being generated.
Press `Ctrl+C` to stop streaming the logs.
You can use
<pre class="terminal">
$ cf logs my-go-app --recent
</pre>
to get the most recent logs.
<div style="text-align:center;margin:3em;">
<a href="./scale.html" class="btn btn-primary">I've learned how to see my logs</a>
</div>