-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlogs.html.md.erb
38 lines (27 loc) · 1.73 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
35
36
37
38
---
title: View Logs
owner: Daniel Freitag
---
<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-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
</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-java-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>