The logging definition file

File log4j2.xml specifies the logging options for the PolicyCenter server. You access this file from the following location in Guidewire Studio:
  • configuration > config > logging

The log4j2 file uses the XML format specified by Apache log4j-2. The entries in log4j2.xml control what to log and to which file to write the logging information.

This file contains a single top-level <Configuration> element with multiple subelements.

<Configuration status="...">
  <Properties .../>
  <Appenders .../>
  <Loggers .../> 
</configuration>

Often, while configuring Apache log4j-2, it is necessary to view the generated status events. Adding the status attribute to the <Configuration> element provides a way to view status events at the specified level.

The logging elements define the following logging components:

<Properties>

A property defines a specific global value in the logging file. For example:

  • The base directory to which PolicyCenter writes the generated log files.
  • The default formatting pattern to use for each log file name.

<Appenders>

An appender defines a specific target location to which to write logging information. The appender definition includes such information as the log file name and the text formatting to use in the file.

Examples of appenders include:

  • The Console appender, which defines the application console log.
  • The RuleEngineLog, which defines a log file that records logging messages generated by the Rules Engine.

<Loggers>

A logger defines configuration parameters associated with a specific appender. For example, this can be the logging level for a specific logging category associated with an appender.

For more information on Apache log4j-2 logging components, refer to the following Apache documentation: