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>