Skip to content

Commit

Permalink
Revises section on viewing logs.[#130303551]
Browse files Browse the repository at this point in the history
  • Loading branch information
sleslie committed Sep 14, 2016
1 parent 1a665ac commit 977bdbf
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions deploy-apps/troubleshoot-app-health.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ If two apps share a route outside of a Blue-Green deploy strategy, choose one ap

Use the techniques in this section to gather diagnostic information and troubleshoot app deployment issues.

### <a id='env'></a>Examining Environment Variables ###
### <a id='env'></a>Examine Environment Variables ###

`cf push` deploys your application to a container on the server.
The environment variables in the container govern your application.
Expand Down Expand Up @@ -215,31 +215,13 @@ $ cf env my-app
my-drain: http://drain.example.com
</pre>

### <a id='logs'></a>Exploring logs ###
### <a id='logs'></a>View Logs ###

To explore all logs available in the container, use the `cf files` command to view the log filenames, then view the log that interests you.
To view app logs streamed in real-time, use the `cf logs APP-NAME` command.

<pre class="terminal">
$ cf files my-app logs/
Getting files for app my-app in org my-org / space development as a.user@example.com...
OK

staging_task.log 844B
stderr.log 182B
stdout.log 0B

$ cf files my-app logs/stderr.log
Getting files for app my-app in org my-org / space development as a.user@example.com...
OK

[2014-01-27 20:21:58] INFO WEBrick 1.3.1
[2014-01-27 20:21:58] INFO ruby 1.9.3 (2013-11-22) [x86_64-linux]
[2014-01-27 20:21:58] INFO WEBrick::HTTPServer#start: pid=31 port=64391
</pre>

<p class="note"><strong>Note</strong>: Diego does not support the <code>cf files</code> command. For apps deployed to Diego, use the <code>cf ssh APP-NAME</code> command to list files in your application instances.</p>
To aggregate your app logs to view log history, bind your app to a syslog drain service. For more information, see [Streaming Application Logs to Log Management Services](./devguide/services/log-management.html).

### <a id='trace'></a>Tracing Cloud Controller REST API Calls ###
### <a id='trace'></a>Trace Cloud Controller REST API Calls ###

If a command fails or produces unexpected results, re-run it with HTTP tracing
enabled to view requests and responses between the cf CLI and the Cloud Controller REST API.
Expand Down

0 comments on commit 977bdbf

Please sign in to comment.