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 toDEBUG.Note: This level should be changed toINFOfor production environments.
Enabling TRACE logging for specific packages
- 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.controllerpackage, add the following entry:<logger name="com.hcl.catalog.controller"> <level value="TRACE" /> </logger> - 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
loggersendpoint.
This allows dynamic logging changes without restarting the catalog server.POST {{catalog-url}}/catalog/api/actuator/loggers/com.hcl.catalog.controller Content-Type: application/json { "configuredLevel": "TRACE" }
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
- To enable this tracing, set the logging level to
TRACEfor thecom.hcl.catalog.logging.package.If you enable
TRACElogging for a broad package, such as com.hcl.catalog, the configuration includes thecom.hcl.catalog.logging subpackage.If you enable
TRACElogging for a narrower package such ascom.hcl.catalog.service or com.hcl.catalog.batch, you must also explicitly enableTRACElogging forcom.hcl.catalog.logging. -
Note: The system disables method-level tracing. The AOP engine remains active, but you must enable
TRACElogging to view trace output. If you do not configureTRACElogging, the system does not generate method entry and exit logs.