cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom logging in a rule/workflow step

Custom logging in a rule/workflow step

Oftentimes, it's difficult to figure out which SailPoint class to enable logging on when debugging a rule.

 

Plus turning on logging for a connector in order to debug a rule, has the added effect of turning on all other logging

statements for the connector as well which can make it difficult to isolate the log statements for your rule.

 

Here is a trick to do your own per-rule custom logging:

 

1. Make sure to import the apache log4j Logger object

import org.apache.log4j.Logger;

2. Create a custom logger in your rule or workflow code:

Logger  mylogger = Logger.getLogger("com.yourcompany.projectname.FinanceCorrelationRule ");

3. Use this logger object for all your logging in the rule:

mylogger.debug("This is a debug message");     mylogger.info("This is an info message");

4. Using your log4j.properties file, control logging per rule by enabling or disabling logging:

log4j.logger.com.yourcompany.projectname.FinanceCorrelationRule =<loglevel>

Labels (5)
Version history
Revision #:
4 of 4
Last update:
‎May 17, 2026 01:45 AM
Updated by: