Configure logging for the Search Server (Developer environment)

We can configure logging in the Search server by updating the WAS Liberty server.xml file.

Note:

When you work with IBM to debug request processing problems, there might be occasions where low-level tracing components must be enabled to capture details for how the request is processed. These low-level Application server trace components do not know the request intent or the potential data within. Therefore, when enabled, it is possible that these tracing components might potentially include sensitive information, in plain text, in the trace file.

IBM recommends 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

  1. Go to the Liberty_installdir/usr/servers/searchServer/configDropins/overrides directory.

  2. Within the overrides directory, create a server.xml file.

  3. Add trace settings within your new server.xml file to enable the trace that 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:

      <server> 
        <logging traceSpecification="component=level:component=level"/>
      </server>

    Where component is the component for which to set a log detail level, and level 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 WebSphere Commerce-related trace strings that we can use.

    Component Trace string
    Search build index

      *=info:com.ibm.commerce.foundation.*=all:
      com.ibm.commerce.search.*=all:
      org.apache.solr.*=all:
      com.ibm.commerce.solr.*=all

    Search cache invalidation

      *=info:com.ibm.commerce.foundation.*=all: 
      com.ibm.commerce.search.*=all: 
      org.apache.solr.*=all: 
      com.ibm.commerce.solr.*=all

    Search core creation

      *=info:com.ibm.commerce.foundation.*=all: 
      com.ibm.commerce.search.*=all: 
      org.apache.solr.*=all: 
      com.ibm.commerce.solr.*=all

    Search facets

      *=info:com.ibm.commerce.foundation.*=all:
      com.ibm.commerce.search.*=all: 
      com.ibm.commerce.rest.*=all

    Search health check

      *=info:com.ibm.commerce.foundation.*=all: 
      com.ibm.commerce.search.*=all: 
      org.apache.solr.*=all:
      com.ibm.commerce.solr.*=all

    Search relevancy

      *=info:com.ibm.commerce.foundation.*=all:
      com.ibm.commerce.rest.*=all

    Search replication

      *=info:com.ibm.commerce.foundation.*=all: 
      com.ibm.commerce.search.*=all: 
      org.apache.solr.*=all: 
      com.ibm.commerce.solr.*=all

    Search rules

      com.ibm.commerce.rest.*=all:
      com.ibm.commerce.foundation.*=all

    Search Rules Based Sales Categories

      com.ibm.commerce.rest.*=all:com.ibm.commerce.foundation.*=all

    Search runtime

      *=info:com.ibm.commerce.foundation.*=all: 
      com.ibm.commerce.search.*=all: 
      com.ibm.commerce.rest.*=all

    Search term associations and landing pages

      *=info:com.ibm.commerce.foundation.*=all: 
      com.ibm.commerce.search.*=all: 
      com.ibm.commerce.rest.*=all


Results

The trace configuration is set for the server. You do not need to restart a server for the log configuration to take effect. The changes are automatically applied. Your logging configuration remain until you change the server.xml file again.