Brazos UI for IBM BPM External UI - Changing the log level

Follow

Overview

This article is specific to Brazos UI for IBM BPM External User Interfaces. Brazos UI utilizes Log4j2 as its logging framework. This article explains how to customize the logging configuration.

Changing the default logging

The log levels and appenders may be overridden by providing a custom log4j2.xml file and referencing it through a JVM argument. A sample log4j2.xml file is attached that changes the Brazos UI logging log level to debug. It can be placed anywhere on the server's file system.

To enable the use of this configuration file:

  1. Download the sample log4j2.xml to the server file system (ex: file:/C:/IBM/log4j2.xml or file:/opt/IBM/log4j2.xml)
  2. Login to the WAS Admin Console
  3. Go to Servers -> Server Type -> WebSphere Application Server
  4. From the table, click the link for the server that you have the Brazos UI installed on
  5. In the Server Infrastructure section, expand Java and Process Management and click the Process definition link
  6. In the Additional Properties section, click the Java Virtual Machine link
  7. In the box labeled Generic JVM Arguments, add
    -Dlog4j.configurationFile=file:<file location> (ex: file:/C:/IBM/log4j2.xml or file:/opt/IBM/log4j2.xml)
  8. Save the changes
  9. Navigate to Servers -> Server Type -> WebSphere Application Server
  10. From the table, select the server that you have the Brazos UI installed on and click the Restart button from the button group at the top of the table to restart the server 

Automatic Reconfiguration 

When configured from a File, Log4j2 has the ability to automatically detect changes to the configuration file and reconfigure itself without having to restart the server. If the monitorInterval attribute is specified on the configuration element and is set to a non-zero value then the file will be checked the next time a log event is evaluated and/or logged and the monitorInterval has elapsed since the last check. The attached file log4j2.xml shows how to configure the attribute so that the configuration file will be checked for changes only after at least 30 seconds have elapsed. The minimum interval is 5 seconds. 

Servers with existing Log4j2 configuration

If Log4j2 has been configured on the server already, then the existing configuration needs to be modified to include Brazos UI. We recommend that you add all of the appenders and loggers defined in the attached log4j2.xml file to your existing configuration file. 

For more information regarding Log4j2 configuration, visit https://logging.apache.org/log4j/2.x/

Have more questions? Submit a request

Comments

Powered by Zendesk