Configuring logging for the Approval server
You can configure logging in the Approval Server Docker container by running
the setRuntimeTraceSpecs script.
Procedure
- 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.
-
Open the app-secure.properties configuration file for editing
in your persisted volume for the Approval Server Docker container.
For more information on this file, see app-secure.properties.
-
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.
BASIC
.For more information on the Feign client, see Feign logging in the Spring Cloud OpenFeign documentation.
- Save and close the file.
-
Restart the container.
Changes to the Feign API client are only applied once the container is restarted.
-
Open the app-secure.properties configuration file for editing
in your persisted volume for the Approval Server Docker container.
-
Set the trace specification within your Approval Server Docker container using
the setRuntimeTraceSpecs script.
- Navigate to the /SETUP/bin/ directory.
-
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 Approval Server Docker container. 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 Approval server, review step #1 to set the appropriate log level value for Feign in order to capture the appropriate level of verbosity.Available log levels are:trace
debug
info
warn
error
fatal
Note:- When configured as
trace
, all messages are displayed. - When configured as
debug
, all messages are displayed except those tagged astrace
. - When configured as
info
, all messages at levelsinfo
throughfatal
are displayed.
info
trace