Understanding Guidewire intentional logging

In Guidewire InsuranceSuite applications, intentional logging is the act of capturing information about specific business events or application metrics and outputting that information to the PolicyCenter application logs. A marker is a named, hierarchical, object that Guidewire uses to provide additional information in the PolicyCenter application logs. The use of a marker makes it relatively easy to find, parse, and extract the log record associated with a special event.

For example, the following sample log message contains the special <WebLogin> marker.
  • INFO User <WebLogin> User Login…

In this example, User is the name of a logging category. <WebLogin> is an event marker that signifies a user has logged into PolicyCenter.

Formatting business event information

Most business events have some associated data. For example, logging into Guidewire PolicyCenter generates the following types of data:
  • User name
  • Generated jsession-id
  • CRSF token

To be useful to a log monitoring tool, the log needs to format business event data so that it is easily extractable. Depending on the monitoring service involved, the information needs to be formatted either as a key-value map or as a formatted string.

The following code is an example of a formatted string.

{user="su", userId="3", from="0:0:0:0:0:0:0:1", elapsedTimeMs=23,
      external=true, error="java.lang.RuntimeException: behavior code is Error"}

Performance

The use of intentional logging does not affect the performance of Guidewire InsuranceSuite applications.