Back Forward How to install and use remote logging

Listeners operate as Java threads rather than as full requestors, and so cannot be accessed with the Tracer. Accordingly, use logs to debug listeners.

You can examine the Process Commander log files using the Tools > Log Files menu item from the Developer portal. Or you can use the Remote Logging feature to stream the contents of the log file to your workstation. You can watch the log as it grows while running a service rather than opening the log repeatedly.

Follow the steps in the following procedures to configure a listener or service requestor to send log messages to your workstation. Then, using a modified version of the LogFactor5 log analysis module, you can review detailed or filtered messages. (LogFactor5 was an open source project of the Apache Software Foundation.)

Install the log4j Remote Logging package

To install remote logging client software on your workstation:

  1. Select Tools > System Management Application to start the System Management application.
  2. On the System Management application window, select a node. Select the Logging and Tracing > Remote Logging menu item.
  3. Click the link "here" in the sentence "To download log4j socket server click here." This download contains a licensed redistribution from the Apache Software Foundation.
  4. Save the file to a local drive and extract its contents.
  5. Note the directory that you extracted it to so you know where to locate the startSocketServer.cmd file. This file starts the LogFactor5 window that displays the contents of the log.
  6. Review Internet Explorer settings to confirm that your workstation has a Java 1.4.1 or later JVM installed and enabled.
  7. Create a Windows shortcut for the startSocketServer.cmd file and then place it on your desktop. You then can start LogFactor5 with a mouse click.

Start the LogFactor5 Viewer

To start the LogFactor5 viewer applet on your workstation, use the startSocketServer.cmd file on your computer. If you created a Windows shortcut for it, double-click the shortcut. Otherwise, open a Windows command line session, navigate to the directory where you installed it, and double-click the file. The LogFactor5 window appears.

Add Your workstation to the Active Logger List

After starting the LogFactor5 viewer, identify your workstation to the Process Commander system:

  1. On the Remote logging page in the System Management application, click the Remote Host field. Enter the name of your computer.
  2. Complete the Remote Port field. Enter the TCP/IP port that the log4j package on your computer will listen on. By convention, this port number is 8887.
  3. Optional. The Remote Logger catches messages before they are written to the log file, which means you see all messages about all processes running on the server node. If you want to limit the log messages that are streamed to your workstation, enter a value in the Filter String field. Then, only the messages that contain the string are sent to your LogFactor5 window. For example, you can enter the name of a server; or, to see 404 messages only, enter "404."
  4. Click  Add  . Your workstation is added to the list of active loggers.
  5. Be certain to return to the System Management application later to clear these values when testing is complete.

Examine the log

Now, run the service, examine the system log file in the LogFactor5 window, and look for messages about the service. If too much information appears, consider using the Filter String field in the Logging and Tracing page.

To capture messages about specific email, file, JMS, or MQ services only, identify yourself as an active logger through the listener form of the listener that listens for that service rule.

If not enough information appears in your LogFactor5 window, add more severity levels in the prlogging.xml file.

Modify logging settings

The prlogging.xml configuration file defines the levels of logging events. In a multinode Process Commander system, you can create separate prlogging.xml files for each node. (OldIn releases before Version 4.2 SP2, this file was named log4j.xml.)

When you testing services, enable logging for the com.pega.pegarules.services Java package, or use the Logging Level tool to enable logging for this package temporarily.

Definitions appender, Pega log, prlogging.xml file
Related topics About the System Management application
About the Logging Level tool
File Listener form — Completing the Properties tab

Email Listener form
Completing the Properties tab
JMS Listener form
Completing the Properties tab
MQ Listener form
Completing the Properties tab

UpIntegration-Services category