Catalog import logging services

Commerce+ maintains a detailed set of logs related to a variety of processes and functions. The Catalog import service uses Logback for logging, integrated with Spring Boot. Logging settings are configured in the logback-spring.xml file.

Default logging level
By default, the logging level for all com.hcl.* packages is set to DEBUG.
Note: This level should be changed to INFO for production environments.

Enabling TRACE logging for specific packages

  1. To enable more granular logging for a specific package, you can configure TRACE-level logging in the logback-spring.xml file. For example, to enable TRACE logging for the com.hcl.catalog.controller package, add the following entry:
    <logger name="com.hcl.catalog.controller">
        <level value="TRACE" />
    </logger>
  2. After updating the configuration, restart the catalog data service for the changes to take effect.

Dynamically enabling TRACE logging (No restart required)

  • You can enable TRACE logging for a specific package at runtime using Spring Boot Actuator’s loggers endpoint.
    POST {{catalog-url}}/catalog/api/actuator/loggers/com.hcl.catalog.controller
    Content-Type: application/json
    
    {
      "configuredLevel": "TRACE"
    }
    This allows dynamic logging changes without restarting the catalog server.

Listing logging levels

To view the current logging levels for all packages on the catalog server, call the following endpoint:

GET {{catalog-url}}/catalog/api/actuator/loggers

Method-level entry and exit logging

The Catalog PBC uses Spring (Aspect-Oriented Programming) to trace method-level entry and exit points.
  • To enable this tracing, set the logging level to TRACE for the com.hcl.catalog.logging. package.

    If you enable TRACE logging for a broad package, such as com.hcl.catalog, the configuration includes the com.hcl.catalog.logging subpackage.

    If you enable TRACE logging for a narrower package such as com.hcl.catalog.service or com.hcl.catalog.batch, you must also explicitly enable TRACE logging for com.hcl.catalog.logging.

  • Note: The system disables method-level tracing. The AOP engine remains active, but you must enable TRACE logging to view trace output. If you do not configure TRACE logging, the system does not generate method entry and exit logs.