Default Log4j 2 Configuration for Java
This topic only applies to self-managed Intelligent Advisor edition
There is a default log4j2.xml file inside the determinations-batch.jar file for Intelligent Advisor Java Batch Processor. The logging level is set to "warn" and send output to the console. If a log4j2.xml file is placed in the working directory of Java Batch Processor, that file will be used instead of the default configuration.
To allow for specific categories of information to be easily separated from the rest of the logged information, Java Batch Processor uses the following log categories:
- MAIN - Log category for the main progress information
- CASE_ERROR - Log category for reporting errors that affect individual cases.
-
CASE_WARNING - Log category for reporting warnings that do not prevent an individual case from being processed, but may have adversely affected the case outcomes.
Log messages for these categories are filtered and logged according to the default log configuration described above. If a custom log configuration file is provided, the logging level and destination can be changed.
Messages logged to the CASE_ERROR and CASE_WARNING categories described above are attributed to individual cases. The identity of the case is included in the message itself, but to allow for simpler parsing the case identity can also be accessed from a custom log field named CaseID. This custom log field can be included in the layout of a configured appender with the syntax %X{CaseID}.