Question & Answer
Question
Why is only the message from the "logger.error" method is displayed in the log output when used in the Identity Governance and Intelligence Rules Development Toolkit 5.2.6?
In this scenario, the following simple test advanced rule is created in Access Governance Core > Configure > Rules.
when
eval( true )
then
logger.info(">>>> Log info");
logger.debug(">>>> Log debug");
logger.warn(">>>> Log warn");
logger.error(">>>> Log error");
eval( true )
then
logger.info(">>>> Log info");
logger.debug(">>>> Log debug");
logger.warn(">>>> Log warn");
logger.error(">>>> Log error");
The rule is downloaded to the IGI Rules Development Toolkit environment and run.
The following example of the log output shows only the message from the logger.error method is displayed.
INIT IGI
INFO RulesEngineDevTools - Reading configuration file C:\Toolkit5261\Workspace\RulesDevelopment/config/bootstrap.properties
INFO RulesEngineDevTools - Initializing IGI, please wait ...
INFO RulesEngineDevTools - IGI, initialized.
INFO RulesEngineDevTools - IGI Log level set to DEBUG for Rule Engine
WARN RootClass - composite-id class does not override hashCode(): com.engiweb.profilemanager.backend.hbean.UserPreferenceKey
INFO RulesEngineDevTools - ***** START execution of ADVANCED_RULES_EXAMPLES
ERROR AGC - >>>> Log error
INFO RulesEngineDevTools - ***** END execution
Cause
There is a setting in the "RulesDevelopment" project located in the log4j.xml file, which you can change to resolve only the message from the "logger.error" method being displayed in the log output.
Answer
In Eclipse in your project locate and open the /RulesDevelopment/config/properties/logging/log4j.xml file.
Find the text as shown in the following example.
Change the text from:
<root>
<level value="ERROR"/>
<appender-ref ref="console" />
</root>
<level value="ERROR"/>
<appender-ref ref="console" />
</root>
To:
<root>
<level value="DEBUG"/>
<appender-ref ref="console" />
</root>
<level value="DEBUG"/>
<appender-ref ref="console" />
</root>
Save the file, refresh the project and run the advanced rule again.
The following example shows the log output where all the messages from the logger methods are displayed.
INIT IGI
INFO RulesEngineDevTools - Reading configuration file C:\Toolkit5261\Workspace\RulesDevelopment/config/bootstrap.properties
INFO RulesEngineDevTools - Initializing IGI, please wait ...
INFO RulesEngineDevTools - IGI, initialized.
INFO RulesEngineDevTools - IGI Log level set to DEBUG for Rule Engine
WARN RootClass - composite-id class does not override hashCode(): com.engiweb.profilemanager.backend.hbean.UserPreferenceKey
INFO RulesEngineDevTools - ***** START execution of ADVANCED_RULES_EXAMPLES
INFO AGC - START
RuleFlow -> ADVANCED/<Empty>/ADVANCED_RULES_EXAMPLES/RUN
INFO AGC - Direct call to the debug flow class rules.advanced.advanced_rules_examples.TestFlow
INFO AGC - >>>> Log info
DEBUG AGC - >>>> Log debug
WARN AGC - >>>> Log warn
ERROR AGC - >>>> Log error
INFO AGC - STOP
Process <Empty>/ADVANCED_RULES_EXAMPLES/RUN
INFO RulesEngineDevTools - ***** END execution
INFO RulesEngineDevTools - Reading configuration file C:\Toolkit5261\Workspace\RulesDevelopment/config/bootstrap.properties
INFO RulesEngineDevTools - Initializing IGI, please wait ...
INFO RulesEngineDevTools - IGI, initialized.
INFO RulesEngineDevTools - IGI Log level set to DEBUG for Rule Engine
WARN RootClass - composite-id class does not override hashCode(): com.engiweb.profilemanager.backend.hbean.UserPreferenceKey
INFO RulesEngineDevTools - ***** START execution of ADVANCED_RULES_EXAMPLES
INFO AGC - START
RuleFlow -> ADVANCED/<Empty>/ADVANCED_RULES_EXAMPLES/RUN
INFO AGC - Direct call to the debug flow class rules.advanced.advanced_rules_examples.TestFlow
INFO AGC - >>>> Log info
DEBUG AGC - >>>> Log debug
WARN AGC - >>>> Log warn
ERROR AGC - >>>> Log error
INFO AGC - STOP
Process <Empty>/ADVANCED_RULES_EXAMPLES/RUN
INFO RulesEngineDevTools - ***** END execution
Related Information
[{"Line of Business":{"code":"LOB24","label":"Security Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSGHJR","label":"IBM Security Identity Governance and Intelligence"},"ARM Category":[{"code":"a8m0z0000001hXBAAY","label":"Identity Governance & Intelligence"}],"ARM Case Number":"TS004083271","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"5.2.6"}]
Was this topic helpful?
Document Information
Modified date:
05 October 2020
UID
ibm16340243