SAP Commerce’s database audit logging can get really annoying. Every database interaction creates a DB_AUDIT
log from the AuditbaleActionsHandler
. Especially, if you want to debug a database heavy class it can get really hard to find your beloved debug logs in between all the audit logs. But turning off the audit logs isn’t that easy.
I found this article about audit logging. It suggests to set the following properties:
log4j2.logger.auditableActionsHandler.name=de.hybris.platform.audit.actions.impl.Slf4jAuditableActionHandler
log4j2.logger.auditableActionsHandler.level=OFF
That did not work for me. Even after setting the properties in the properties in my local.properties
I got all the logs. Also editing the Log4J config did not work. Then I found this note from SAP. The only thing that seems to work is to turn off the logging for every item type. But how do you know which types to set? Here is an easy step by step solution.
- You need to install xmlstarlet
- Go to your source
- Find all item types that are enabled for database audit logging.
You will get a text file dbaudit.txt
with all item types and the dbaudit.<itemtype>.disbaled
property set to true. Now, turn everything into lower case, and put them into your local.properties
. Voila! The logging is gone.