-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlogs.html.md.erb
34 lines (23 loc) · 1.39 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-nodejs-app
Connected, tailing logs for app my-nodejs-app in org MyOrg / space MySpace as user@mydomain.com...
2016-03-30T16:37:06.39+0200 [App/0] OUT GET / 200 1.756 ms - 212
2016-03-30T16:37:06.39+0200 [RTR/1] OUT my-random-hostname.scapp.io - [30/03/2016:14:37:06 +0000] "GET / HTTP/1.1" 200 0 212 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36" 195.65.130.2:61671 x_forwarded_for:"-" x_forwarded_proto:"http" vcap_request_id:f1ac25ce-2ca5-4538-59c5-83d58de55766 response_time:0.005294073 app_id:c98d5025-1bc9-46aa-8bba-51f55f7f2599
</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-nodejs-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>