<-- Back

How to set log level for a single log node on SAP BTP

Introduction

When running an app on SAP BTP, setting a higher log level (debug or trace) is needed for debugging purposes on a single log node. Setting the SapLogLevel variable changes the log level for all nodes, which generates excessive log messages and can overwhelm the log subscriber.

Environment

Applications hosted in SAP Business Technology Platform

Instructions/Procedure

To set the log level for specific log nodes on SAP BTP, use the LOGGING_CONFIG variable. There are two methods to configure this:

Method 1: Using SAP BTP Cockpit

  1. Navigate to the SAP Cloud Platform cockpit
  2. Create a new User-Provided Variable for the app with:
    • Key: LOGGING_CONFIG
    • Value: {"LOGNODE1":"LEVEL","LOGNODE2":"LEVEL"}. For example {"ODataConnector": "TRACE"} or {"Core": "ERROR","ODataConnector": "TRACE"}
  3. Save the User-Provided Variable
  4. Restart the app to activate the setting

Method 2: Using Mendix Portal

  1. In the Mendix Portal, navigate to the Runtime tab
  2. Add the LOGGING_CONFIG variable in the Custom Environment Variables section
  3. Use the same key-value format as in Method 1:
    • Key: LOGGING_CONFIG
    • Value: {"LOGNODE":"LEVEL"}
  4. Deploy or restart the application

This method allows developers to configure log levels without accessing the SAP BTP cockpit directly.

Outcome

After completing the steps in this article, the log level of a single log node is set to the level desired.

Internal information related

223032

Additional information

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.