
Configuring logging for the Store server (Developer environment)
You can configure logging in the Store server by updating the WAS Liberty server.xml file.
It is recommended that you do not enable these types of tracing components on a production system and attempt to simulate the problem on a quality assurance environment to capture the appropriate information. However, if the tracing components must be enabled on a production system, handle the trace files with caution. Before you send the trace, remove sensitive data that might be in the trace before you allow a third party to use the trace for diagnosis. Further, when the trace is no longer required, remove the files with a military-grade data wiping process. When the problem is found and the tracing component is no longer required, immediately disable the low-level tracing components.
Procedure
- Go to the Liberty_installdir/usr/servers/crsServer/configDropins/overrides directory.
- Within the overrides directory, create a server.xml file.
-
Add trace settings within your new server.xml file to enable the
trace that you need to set. Set logging properties by adding the trace specification as a
logging element within the file.
Use the following format to set your trace specification:
Where<server> <logging traceSpecification="component=level:component=level"/> </server>
component
is the component for which to set a log detail level, andlevel
is one of the valid logger levels (off, fatal, severe, warning, audit, info, config, detail, fine, finer, finest, all). Separate multiple log detail level specifications with colons (:)The following example log element sets the trace specification for a component to the finest log level:<server description="Enable trace on Liberty"> <logging traceSpecification="*=audit:com.myco.mypackage.*=finest"/> </server>
For more information about setting logging properties within WebSphere Liberty, see .
Here are a set of HCL Commerce-related trace strings that you can use.
Component Trace string Marketing com.ibm.commerce.marketing.cache.*=all com.ibm.commerce.store.marketing.*=all com.ibm.commerce.foundation.logging.*=all
Search com.ibm.commerce.foundation.*=all: com.ibm.commerce.rest.*=all
Dynamic Cache Each trace string creates some extra logging and can impact performance. If you need to reduce the performance impact, remove the trace strings beginning from the end of the list, unless a particular string is required for diagnosing the initial issue.
com.ibm.commerce.component.cache.config.*=all com.ibm.commerce.dynacache.filter.*=all com.ibm.commerce.foundation.logging.*=all
Session Management com.ibm.commerce.store.foundation.session.*=all com.ibm.commerce.foundation.logging.*=all
Access control com.ibm.commerce.component.helper.*=all com.ibm.commerce.component.registry.*=all com.ibm.commerce.foundation.logging.*=all
Cross site protection com.ibm.commerce.store.foundation.utils.*=all com.ibm.commerce.foundation.logging.*=all
SEO com.ibm.commerce.component.seo.*=all com.ibm.commerce.store.foundation.internal.client.taglib.*=all com.ibm.commerce.foundation.logging.*=all
Commerce Composer com.ibm.commerce.store.pagelayout.*=all com.ibm.commerce.store.pagelayout.internal.client.taglib.*=all com.ibm.commerce.foundation.logging.*=all
Store foundation com.ibm.commerce.component.mvc.*=all com.ibm.commerce.store.mvc.*=all com.ibm.commerce.store.servlet.*=all com.ibm.commerce.component.server.*=all com.ibm.commerce.component.internal.client.util.*=all com.ibm.commerce.component.rest.helper.*=all com.ibm.commerce.client.rest.RestClientReadEfficiencyLogger=fine com.ibm.commerce.foundation.logging.service.RestClientLogger=fine com.ibm.commerce.foundation.logging.*=all