Application Logging
BTP & Integrationbeginner

BTP Application Logging Part 1: Why Logs Matter on BTP

Key takeaway

Learn how BTP applications produce and store logs: log levels, structured JSON logs, the application logging/observability services for Cloud Foundry, dashboards for search, and the difference between application logs and Integration Suite message processing logs.

What this complete series covers

Learn Application Logging in a clear, practical sequence — from the basic idea to real project use, troubleshooting, and interview-ready understanding.

Who it is for
Best for SAP consultants, developers, and learners who want a practical understanding of Application Logging.
Prerequisites
A basic understanding of SAP BTP helps. Hands-on steps may require a BTP subaccount and access to the relevant Integration Suite or BTP service.
Final outcome
By the end, you should be able to explain Application Logging clearly, follow the main end-to-end flow, apply it in a project scenario, and troubleshoot the most common issues.
  1. Part 1: BTP Application Logging Part 1: Why Logs Matter on BTP

    Introduces why application logging matters on SAP BTP, the core concepts of log levels, log formats, and the Application Logging service, and how logs differ from other observabili

  2. Part 2: BTP Application Logging Part 2: Configuring and Consuming Logging on Cloud Foundry

    Explains how to provision, bind, and configure the Application Logging service on Cloud Foundry, how logging works on Kyma, and how to retrieve and filter logs during troubleshooti

  3. Part 3: BTP Application Logging Part 3: Log Correlation and Troubleshooting Across Services

    Learn how to trace a single business transaction across multiple BTP microservices using correlation IDs, retrieve logs efficiently through the Log and Trace Viewer or Kibana, and

System and release assumptions: SAP BTP services evolve regularly. Capability names, screens, and setup steps can differ by region, entitlement, and tenant version; the core design principles remain the same.

Explanation

📌 KEY POINTS
✅ Apps write logs to stdout/stderr; BTP collects them (cf logs shows recent ones).

✅ An application logging/observability service stores and indexes logs for search and dashboards (SAP Cloud Logging is the newer service — check what your landscape uses).

✅ Structured (JSON) logs with levels and correlation IDs make analysis possible.

✅ Integration Suite has its own message processing logs (MPL) for iFlows.

⚠️ Logs are not free storage: log levels too verbose in production cost money and hide important entries.

━━━━━━━━━━━━━━━━━━━━
▶ WHAT THIS SERIES COVERS

Part 1: Why logs matter

Part 2: Configuring and consuming logging on Cloud Foundry

Part 3: Correlation and troubleshooting across services

━━━━━━━━━━━━━━━━━━━━
▶ 1. LOG SOURCES

  • Apps, router, platform, integration.

━━━━━━━━━━━━━━━━━━━━
▶ 2. LEVELS

  • ERROR, WARN, INFO, DEBUG.

━━━━━━━━━━━━━━━━━━━━
▶ 3. STRUCTURED LOGS

  • JSON fields: level, msg, correlation_id.

━━━━━━━━━━━━━━━━━━━━
▶ 4. SERVICES

  • Application logging / Cloud Logging dashboards.

━━━━━━━━━━━━━━━━━━━━
▶ 5. INTEGRATION LOGS

  • MPL in Integration Suite monitoring.

━━━━━━━━━━━━━━━━━━━━
▶ STEP BY STEP

  1. Check recent logs with cf logs.
  2. Bind a logging service.
  3. Search logs in the dashboard.

✅ CHECKPOINT: you can find one request's logs by correlation ID.

Code example

ABAP Code
===== QUICK LOOK =====cf logs my-app --recentStructured log line: {"level":"ERROR","msg":"Order save failed","correlation_id":"4f2a...","component":"orders-srv"} ===== SOURCES =====App logs | app router access logs | platform events | Integration Suite MPL (Monitor → Message Processing)

Real project scenario

A company's app failed intermittently, but only unstructured text logs existed and cf logs showed just recent lines. Binding a logging service and switching to structured JSON logs let support find failures in minutes.

Common mistakes

  • Unstructured logs.
  • DEBUG in prod.
  • Logging personal data.
  • Relying on cf logs only.
  • Ignoring MPL for iFlows.

Best practices

  • Structured logs.
  • Right levels.
  • Mask sensitive data.
  • Use a logging service.
  • Know MPL.

Interview angle

Questions: "How are logs collected on BTP?", "Why structured logs?", "App logs vs MPL?"
Strong answer: sources, levels, structure, services, integration logs.

Practice this lesson

Quick check

1. Why are structured (JSON) logs preferred on BTP?

2. During root-cause analysis, a developer wants to attach a custom text snippet (such as an intermediate variable value) to the Message Processing Log at a specific point in an integration flow's processing. Which Groovy script call is most appropriate?

3. Which of the following best describes a key operational risk of leaving multiple production integration flows permanently set to Trace log level?

Interview questions

1. What are the core concepts of Application Logging, and how would you explain them clearly in an SAP interview?

Answer it in your own words first, then compare.

2. Could you explain the fundamental differences in how application logging is configured and consumed in the SAP BTP, Cloud Foundry environment versus the Kyma environment?

Answer it in your own words first, then compare.

Practice more with Interview AI →

Reference-verified: the steps are checked against official SAP documentation and tutorials, and object and field names in the sample code are checked for consistency. The code has not been compiled or run on an SAP system by ERPClimb. Syntax marked release-dependent varies by SAP release, so check it in your own system.

More lessons in this topic

Interview questions on this topic

Related SAP topics