on 2025 Feb 04 12:17 AM
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:
Thank you so much in advance!
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.