SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Overview of Cloud Foundry Application Logs

Understand what application logs are and the various methods used to view them

Overview

🎓 beginner 15 min. SAP BTP Cloud Foundry Runtime And EnvironmentBeginnerCloud

You will learn

  • โœ”What application logs are and how they are processed
  • โœ”How to view logs using the cf cli and log cache plugin
  • โœ”How logs are formatted and what log types are supported
  • โœ”How logs are ordered
Beyhan Veli B Beyhan Veli April 13, 2026
Created by August 1, 2024
Contributors

Prerequisites

Steps

Intro

This tutorial assumes you have completed the tutorials within the Understand the Cloud Foundry Application Lifecycle tutorial and you have a working cf-nodejs application.


Step 1 Application Logs
โ€”

Application logs are those logs produced by the applications you deploy in Cloud Foundry. The contents of these logs are determined by you as the developer of the application. In order for the application logs to be picked up by the logging system in Cloud Foundry they must be written to stdout and/or stderr. The logs can then pass through the logging system, and be used by the clients/services that need them. For more information on stdout and stderr, see this Wikipedia entry on Standard Streams.

The Cloud Foundry Command Line Interface (cf cli) provides several options for viewing your logs. To see a real-time stream of the logs from your cf-nodejs application, run the following in your terminal:

Code
cf logs cf-nodejs

You can then watch this update in real time by refreshing the application’s webpage and observing the output that is produced in the terminal. To exit the stream simply hit ctrl-c on your keyboard.

Using the cf logs command
Using the cf logs command

If you want to dump the most recent logs from your app to the screen, run:

Code
cf logs cf-nodejs --recent

Grabbing the most recent logs
Grabbing the most recent logs

Step 2 Install the log cache plugin
+
Step 3 Log Format and Log Types
+
Step 4 Log Ordering
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 4
1. Application Logs 2. Install the log cache plugin 3. Log Format and Log Types 4. Log Ordering

Learn more →