Rule Designer logging

Rule Designer provides logging services based on the standard logging service Java™ logger java.util.logging in the Eclipse integrated development environment.

With the logger, you can log messages based on message type and level, and control how these messages are formatted and stored at run time.

Understanding the logs: Java logger

The Java logger provides logs based on level. The Level class for the java.util.logging package contains fields for the preset levels SEVERE, WARNING, INFO, CONFIG, FINE, FINER, and FINEST. To log a message for a particular level, you call the log method with the level and message you want. For example, this method logs a SEVERE level message:

logger.log(Level.SEVERE, “Severe level message.”);

When you run log methods, the output is similar to the following message:

July 30, 2010 4:00:54 PM JavaLoggingSample <init>

SEVERE: Severe level message.

The first line of the message provides date and time information for the event, followed by the name of the class and the best guess from the logging API as to the routine that made the call (<init>):

  • July 30, 2010 4:00:54 PM JavaLoggingSample <init>

The second line gives the level of the log and a statement explaining the event:

  • SEVERE: Severe level message.

The logging API does not guarantee the accuracy of the trace information because stack traces can be affected by runtime environments.

Default settings

Java logger messages are stored in the .log file of the .metadata directory in the project workspace:

  • <workspace>\.metadata\.log

Synchronization logs

Rule Designer uses the Java logger in Eclipse to monitor synchronization between Rule Designer and Decision Center. Eclipse provides a log file that you can check if a problem occurs during synchronization.

The log file can be found in the following places:

  • Workspace log: This is the most common location for the log file. It is stored in the workspace in the metadata directory: workspace\.metadata\.log.

  • Configuration log: Sometimes information is recorded in the configuration log file instead of the workspace log. This can happen when the workspace cannot be created or has not been created yet. The configuration log can be found in the configuration area: configuration\<timestamp>.log.

If a problem occurs in a system before there is a workspace or a configuration area, a log is not kept because there is no place to store it.

References

You can find comprehensive information for the Java logger on the Internet: