Disabling log traces in Java SE

You can set the JDK logger, the XU logger, and Java™ SE rule sessions to write no logging information to the execution traces when rulesets are executed in a Java SE environment.

About this task

By default, Java SE rule sessions generate log traces through three different processes. To remove any trace, you must disable the JDK logger, the XU logger, and the logger that you might have attached to instances of stateless Java rule session factories.

Procedure

  1. Disable the JDK logging service in one of the following ways:
    • In the ra.xml file, make sure that the jdkLoggingEnabled property is set to false.
      Note: In WebSphere® Application Server, its default value is true.
    • Whatever the setting of the jdkLoggingEnabled property, you can override it as follows:
      1. Create a properties file named, for example, logging.properties and specify the appropriate handlers and logging options in this file.
      2. Set the logging level to OFF.
      3. Run your rule application with option -Djava.util.logging.config.file=logging.properties so that the configuration is taken into account.
    For more information about Java logging, refer to the Sun Developer Center.
  2. In the ra.xml file, set the traceLevel parameter to OFF.

    If you disable the JDK logging service and the execution trace, some information is still logged. To log nothing at all, use the API for rule session factories in a Java SE context.

  3. Pass the null value to the IlrJ2SESessionFactory constructor on stateless Java rule session factories.
    IlrJ2SESessionFactory sessionFactory = new IlrJ2SESessionFactory(null);