Debug SAP Commerce Cloud 2011 and later

This is for:

Developer

To troubleshoot issues with the Coveo for Commerce integration with SAP Commerce Cloud 2011 and later, you can:

  • If you don’t have access to the source code, temporarily set up logging in the SAP Commerce Administration Console (or HAC, Hybris Administration console).

  • Apply logging settings permanently in the source code of your project.

This article explains how to do so.

Temporary setup

To change the logging settings that will be active only until the next server restart:

  1. Open the HAC at https://localhost:9002/platform/log4j. You can also navigate to the Logging page by clicking PlatformLogging in the top menu.

  2. Each line represents a class or package. At the end of each line, you can see the dropdown menu with the current log level.

  3. You can change the log level of any class or package by clicking its dropdown menu and selecting the desired level.

    Tip

    Alternatively, you can:

    1. Enter the class or package name in the top text field.

    2. Choose the log level from the dropdown next to the text field.

    Click configure below the dropdown menu, then click Add to add it to the list.

  4. Once you have selected the desired log level, the new setting is applied immediately and a hint appears at the top of the page to confirm the change.

For details on the log levels, see the SAP Commerce Cloud documentation.

Permanent setup

To permanently change the logging settings:

  1. Open the hybris/config/local.properties file.

  2. Set the desired log level for the classes or packages you want to monitor. Each setting is done by adding two lines to the file, one for the class or package and one for the log level.

    Example
    log4j2.logger.testService.name = de.hybris.platform.test.service.impl.TestService
    log4j2.logger.testService.level = DEBUG
  3. Save the file.

  4. Restart the server to apply the changes.

To narrow down issues specific to the Coveo for Commerce integration, you can set up logging for the following classes:

Components Classes/Packages

Coveo Connector Extensions

com.coveo.*

SAP Hybris Indexing

de.hybris.platform.searchservices.*

SAP Hybris Impex

de.hybris.platform.impex.*