cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Questions about enabling Debug logs in a Production environment

SAPSupport
Employee
Employee
0 Kudos
751

Hey Team,

We need to enable debugging logging on a lower environment to check application logs that will be printed in DEBUG mode. We will need the steps on how to do so along with the information on below questions:

  1. Enabling it in a Production environment, will it cause any impact on its performance?
  2. After enabling it an environment, the past DEBUG logs will be visible for us?

Thank you so much in advance!


------------------------------------------------------------------------------------------------------------------------------------------------
Learn more about the SAP Support user and program here.

Accepted Solutions (1)

Accepted Solutions (1)

SAPSupport
Employee
Employee
0 Kudos

Nice to meet you, my name is Wesley from SAP Technical Support and I am here to assist you 🙂

To enable debug logs, you can refer to the KBA 3277494 How to enable debug logging on specific service from Cloud Portal where we explain how to do it for custom or OOTB services by adding below properties in Cloud Portal affected instances. It is also possible to add logging on a single class or the whole package, however ensure your custom class has debug log statements to print. you can add logging on a single class or the whole package, however ensure your custom class has debug log statements to print:

log4j2.logger.xxLogName.name = xxx.custompackage.com or classname with package
log4j2.logger.xxLogName.level = DEBUG
log4j2.logger.xxLogName.appenderRef.stdout.ref = STDOUT

For example, if you want to enable synchronization logs for the de.hybris.platform.catalog.jalo.synchronization

log4j2.logger.synchronization.name = de.hybris.platform.catalog.jalo.synchronization
log4j2.logger.synchronization.level = debug
log4j2.logger.synchronization.appenderRef.stdout.ref = STDOUT

Similarly, you can give your package or any particular class name.

But keep in mind that enabling debug logs will cause them to expire sooner than the expected as there will be much more logs being generated and On Production environments, it's recommended to set the Log level to WARN. This will avoid outputting unnecessary INFO and DEBUG level logs. Ensure your WARN and ERROR level logs contain sufficient information to diagnose problems. Logging too much information makes it harder to find relevant information when problems do occur. This is explained in the KBA 3440034 Commerce Cloud Logging Best Practices along with recommendations for such cases too.

Regarding the previous debug logs, they are already visible as long as they were enabled, but if you are enabling for a different package/application/service, only from now on they will be visible in OpenSearch.

Kind Regards,
Wesley
SAP Technical Support

Answers (0)