Configuring archive logging operations

About this task

Your PolicyCenter installation must support archiving in order for you to enable archive logging. To enable archiving logging in Guidewire PolicyCenter, do the following:

  • Make the archiving-related logging code in file log4j2.xml active by removing the comments surrounding the example loggers.
  • Configure the example archiving loggers as needed.

Print details of the archive graph

About this task

As the PolicyCenter server starts, the server builds the archive domain graph. To print out the details of how PolicyCenter determines the graph, perform the following steps.

Procedure

  1. Log into PolicyCenter Studio.
  2. Navigate to the following location and open file log4j2.xml for editing.
    • configuration > config > logging
  3. Add the following code to the file.
    <Logger name="Server.Archiving.Graph" level="debug">
      <AppenderRef ref="Console"/>
      <AppenderRef ref="DailyLogFile"/>
    </Logger>

    Add either or both of the <AppenderRef> elements depending on where you want to print the information.

  4. Rebuild and redeploy the PolicyCenter application.

Results

After restarting the application server, you see details in the console log of the archive domain graph.

Generate a separate archive log

About this task

Guidewire recommends as a general practice that you create a separate log file for archive information. To do so, perform the following steps.

Procedure

  1. Log into PolicyCenter Studio.
  2. Navigate to the following location and open file log4j2.xml for editing.

    configuration > config > logging

  3. Add an archive <RollingFile> element similar to the following example to the file.
    <RollingFile name="ArchiveLog" fileName="${guidewire.logDirectory}/archiveLog.log"
          filePattern="${guidewire.logDirectory}/archiveLog.log%d{.yyyy-MM-dd}">
      <PatternLayout pattern="${file.defaultPattern}" charset="UTF-8"/>
      <TimeBasedTriggeringPolicy/>
    </RollingFile>
    
  4. Add a <Logger> archive element that corresponds to the <RollingFile> archive element that you added in the previous step, for example:
    <Logger name="Server.Archiving" level="info">
      <AppenderRef ref="ArchiveLog"/>
    </Logger>
  5. Rebuild and redeploy Guidewire PolicyCenter.