How to enable runtime logging in BRMS and BPM Suite?

Solution Verified - Updated

Environment

  • Red Hat JBoss BRMS (BRMS)
    • 5.x
    • 6.x
  • Red Hat JBoss BPM Suite (BPMS)
    • 6.x
  • Red Hat Decision Manager (RHDM)
    • 7.x
  • Red Hat Process Automation Manager (RHPAM)
    • 7.x

Issue

How do I to enable log when executing some rules, I used a System.out.println("some text"); into free form DRL into guided rule?

Resolution

BRMS 5

Audit logging can be enabled like this:

KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "test5.log");
//interact with the session
logger.close();

The output will be written in the file test5.log and it is possible to view this file directly in the JBDS. For more information read the This content is not included.documentation.

BRMS 6, BPM Suite 6, RHDM 7, RHPAM 7

Audit logging can be enabled like this:

KieRuntimeLogger logger = KieServices.Factory.get().getLoggers().newFileLogger(kSession,"test6.log");
//interact with the session
logger.close();

The output will be written in the file test6.log and it is possible to view this file directly in the JBDS. For more information read the This content is not included.documentation.

Known issues

Currently, there are a couple of issues related to the audit logging in older versions of BRMS:

Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.