Enabling logging on a custom rule

Which IIQ version are you inquiring about?

8.3p3

Please share any images or screenshots, if relevant.

Please share any other relevant files that may be required (for example, logs).

VDOT IdAttr needsLCE Rule.xml (12.1 KB)

Share all details about your problem, including any error messages you may have received.

I need to enable logging on the attached custom rule, but need assistance on what to add to the log4j2.properties file. Please assist. If you need a copy of my log4j2 file, I will attached as well.

Hi @derrickthomasvdot,

did you set properly the logger and the appender on log4j file? and did you reload the log configuration?

Hi @derrickthomasvdot,

Insert the following entry into the log4j2.properties configuration file to enable the desired logging behavior. After updating the file, reload the logging configuration to apply the changes.

logger.Customrule.name=vdot.rule.idattr
logger.Customrule.level=trace
import org.apache.logging.log4j.core.config.Configurator;
import org.apache.logging.log4j.Level;

// Rule or Class level
Configurator.setLevel("com.example.Foo", Level.DEBUG);

// You can also set the root logger:
Configurator.setRootLevel(Level.DEBUG);

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.