Thursday, October 26, 2017

Cloud Foundry Logging Sources Deciphered

Ever deployed a cloud foundry app and ran into errors? I did and still do. My typical reaction is to request the recent app logs and to analyse them for the root cause. The logs contain those strange (if you don't know them) codes, e.g., RTR, STG, APP, PROC, WEB or more. Here is how to decipher them and use them to your advantage.
Happy Cloud Debugging

The codes above denote the Cloud Foundry component emitting the log entry. You can find a list of those component identifiers in the Cloud Foundry documentation or in the IBM Cloud (Bluemix) documentation on Log Sources. There are many component names. I found that remembering the following helps a lot:
  • RTR: This is the router which channels HTTP requests to an app. Here you find information about the request itself including client information.
  • STG: The staging phase has details about the deployment and restaging of an app. They help with initial errors.
  • APP: If your app writes information to stderr or stdout, then you will find it here. For some apps this could be the well-known "printf debugging".
The log entries have either an OUT if the information is from stdout or ERR if from stderr. Else there is not much to remember. Happy Debugging. If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.

No comments:

LinkWithin

Related Posts with Thumbnails