Setting log levels

The WebLogic Scripting Tool allows you to change log levels on the Endeca Server loggers.

You can use the WebLogic Scripting Tool (WLST) to change the default logging levels of the loggers used by the Endeca Server components. The WLST script is located in the $MW_HOME/oracle_common/common/bin directory.

Note: This topic explains how to modify the default Endeca Server loggers. For information on creating a new log handler for Endeca Server (which uses a separate log file), see Creating log handlers for debugging.

Full documentation for WLST is provided in the WebLogic Scripting Tool Command Reference, which is available online at: http://docs.oracle.com/cd/E29597_01/web.1111/e13813/toc.htm

You can use the WLST listLoggers() command to list the Endeca Server loggers:
listLoggers(pattern="com.endeca.*")
The Endeca Server loggers are:
com.endeca.cluster.Cluster
com.endeca.features.TunnelingServlet
com.endeca.features.ws.ControlServletContextListener
com.endeca.opmodel.control.ClusterCoordinator
com.endeca.opmodel.control.DGraph
com.endeca.opmodel.control.DGraphStateMachine
com.endeca.opmodel.control.DGraphs
com.endeca.opmodel.opSupport.ClusterCoordinatorRunner
com.endeca.opmodel.opSupport.DGraphRunner
com.endeca.opmodel.opSupport.RealProcessHandler
com.endeca.opmodel.testhelp.Gatekeeper
com.endeca.opmodel.testhelp.Thrower
com.endeca.router.RoutingFilter
com.endeca.tunneling.util.StreamUtil
com.endeca.util.JRFUtil
com.endeca.util.PropertyUtil
com.endeca.util.TimingFilter
You can then use the WLST setLogLevel() command to set a new log level for a specific logger. The syntax is shown in this example:
setLogLevel(logger="com.endeca.cluster.Cluster", level="TRACE:1", persist=1)
where:
  • logger is a mandatory parameter that specifies the full name of the logger to be modified. Note that the logger name is case-sensitive (which also means that it cannot use a wildcard).
  • level is a mandatory parameter that specifies the log level. You can specify either an ODL level (such as TRACE:16) or a Java level (such as FINER). For a list of the levels, see Message types and levels.
  • persist is an optional parameter that specifies whether the level should be saved to the configuration file. The values are 0 (do not save the level) or 1 (save the level, which will persist across WebLogic re-starts). The default is 1.

To set a log level for an Endeca Server logger:

  1. Make sure that WebLogic Server is running.
  2. From a command prompt, change to the WLST directory.
  3. Start the WLST utility with the script for your operating system:
    • Linux: ./wlst.sh
    • Windows: wlst.cmd
  4. From within WLST, connect to WebLogic Server with your administrator username and password.

    For example:

    connect('weblogic', 'welcome1')
  5. Use the setLogLevel() command to set a new log level for a specific Endeca Server logger.

    For example:

    setLogLevel(logger="com.endeca.opmodel.control.DGraph", level="TRACE:1")
  6. Use the listLoggers command to verify that the log level was changed.

    For example:

    listLoggers(pattern="com.endeca.opmodel.control.DGraph")
  7. When you have finished, use the exit() command to exit the WLST utility.

If you have an Endeca Server cluster, you can set the log level on a specific machine by adding a target option (at Step 5 above).

Keep in mind that the logger will continue to write to the same log file, which by default is $DOMAIN_HOME/servers/AdminServer/logs/AdminServer-diagnostic.log.