Configuring logging for the

You can configure logging in the by running the setRuntimeTraceSpecs script.

Procedure

  1. Optional: If you are logging external REST API calls, you must set the log level for the local Feign API client, depending on the level of trace detail that is required.
    1. Open the app-secure.properties configuration file for editing in your persisted volume for the .
    2. Set the log level value.
      feign.client.config.default.loggerLevel=LOGGER_LEVEL
      Where the available levels are:
      • NONE - Log nothing.
      • BASIC - Log the request method, URL, the response status code, and the execution time.
      • HEADERS - Log basic information along with request and response headers.
      • FULL - Log the headers, body, and metadata for both requests and responses.
      By default, the log level on the is set to BASIC.

      For more information on the Feign client, see Feign logging in the Spring Cloud OpenFeign documentation.

    3. Save and close the file.
    4. Restart the container.
      Changes to the Feign API client are only applied once the container is restarted.
  2. Set the trace specification within your using the setRuntimeTraceSpecs script.
    1. Navigate to the /SETUP/bin/ directory.
    2. Run the setRuntimeTraceSpecs script with the component or components that you want to be traced.
      ./setRuntimeTraceSpecs.sh TRACE_COMPONENT_WITH_LEVEL

      The following table includes the trace strings that are available specifically for the . In some cases, you might need to enable trace strings in multiple servers to fully troubleshoot a component. For more information, see the MustGather sections in Trace components.

      Component Trace string
      Marketplace approval-related issues
      com.hcl.commerce.approval.Logging=trace:com.hcl.commerce.approval.marketplace=trace
      
      Notification-related issues
      com.hcl.commerce.approval.Logging=trace:com.hcl.commerce.approval.notification=trace
      
      Security and Access Control Policy (ACP) related issues
      com.hcl.commerce.approval.Logging=trace:com.hcl.commerce.approval.security=trace:com.hcl.commerce.approval.interceptors.ApprovalAccessHelperInterceptor=trace:com.hcl.commerce.approval.marketplace.access=trace
      Clean-up activity related issues
      com.hcl.commerce.approval.Logging=trace:com.hcl.commerce.approval.marketplace.scheduler.ApprovalDBCleanUpScheduler=trace
      External REST API related issues
      com.hcl.commerce.approval.Logging=trace:com.hcl.commerce.approval.external.clients=trace
      Note: Depending on the level of trace that is set, you may not obtain all of the produced log details. Before setting the trace level for the , review step #1 to set the appropriate log level value for Feign in order to capture the appropriate level of verbosity.

Results

Logging is now configured. You can now reproduce any issues and collect the associated logs for troubleshooting purposes.