Getting logging information for Decision Center
You can get a log of Decision Center activities.
Decision Center uses the standard logging service Java™ logger (java.util.logging). You can log messages based on message type and level, and control how these messages are formatted and stored at run time.
To capture traces of activities that occur in Decision Center, define a logging.properties file and make it available to the JVM through the following option in the startup file of your application server:
-Djava.util.logging.config.file=logging.properties
For example, the logging properties could be:
handlers = java.util.logging.ConsoleHandler
# Set the default logging level for the root logger
.level = ALL
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
# Limit the messages that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
For an introduction to the Java Logging API, visit: An Introduction to the Java Logging API.
You can find comprehensive information for the Java logger in the Oracle Developer Center http://www.oracle.com/technetwork/java/index.html.
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:
logger.log(Level.SEVERE, “Severe level message.”);
When you run the log methods, the output can look like this:
July 30, 2015 4:00:54 PM JavaLoggingSample <init>
SEVERE: Severe level message.
The first line lists the date and time information for the event, followed by the name of the class and the best guess of logging API as to the routine that made the call (<init> ). The second line gives the level of the log and a statement explaining the event. 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 Decision Center consoles by default, and properties are set in the logging.properties file embedded in the Decision Center WAR:
<InstallDir>\teamserver\applicationservers\<appserver>\jrules-teamserver-XXX.war
You can override this behavior by defining their own logging.properties file and adding the argument to a Java running command line for the server:
Djava.util.logging.config.file=logging.properties
Setting a log filter for Decision Center
To obtain Decision Center log messages exclusively, you modify the logging.properties within teamserver.war\WEB-INF\lib\teamserver-web-core-<product version>.jar.
If necessary, start by redeploying your application and emptying your application server cache.
Write the following as your logging.properties:
handlers= 1perso.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level = FINEST
1perso.org.apache.juli.FileHandler.level = ALL
1perso.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1perso.org.apache.juli.FileHandler.prefix = CustomDecisionCenterLog.
1perso.org.apache.juli.FileHandler.formatter = java.util.logging.SimpleFormatter
.level:INFO
ilog.rules.level:ALL
ilog.rules.handlers = 1perso.org.apache.juli.FileHandler,java.util.logging.ConsoleHandler
This creates a log file for Decision Center in the logging folder called CustomDecisionCenterLog-<date>.log.