In the /opt/mango/classes folder you will see two files:
debug-log4j2.xml
log4j2.xml
Rename log4j2.xml to something like standard-log4j2.xml
Rename debug-log4j2.xml to log4j2.xml
Reload the log4J configuration with the Log4J Rest tool on the Admin Home page under Utilities.
Don’t forget to change it back as this will create very big log files and add additional load on the system.
Mango Log4J2 Options
Use the format Below to insert lines into the /classes/log4j2.xml configuration file.
BACnet
Log4J2
<AsyncLogger includeLocation="true" name="com.serotonin.bacnet4j" level="debug"/>
<AsyncLogger includeLocation="true" name="com.serotonin.ma.bacnet" level="debug"/>
SNMP
Log4J2
<AsyncLogger includeLocation=”true” name="com.serotonin.m2m2.snmp" level="debug"/>
<AsyncLogger includeLocation=”true” name="org.snmp4j" level="debug"/>
Turn off poll aborted logs
<AsyncLogger includeLocation=”true” name="com.serotonin.m2m2.rt.dataSource.PollingDataSource" level="error"/>
HAYSTACK
<AsyncLogger includeLocation="true" name="com.infiniteautomation.mango.haystack" level="debug"/>
<AsyncLogger includeLocation="true" name="org.projecthaystack" level="debug"/>
Log4j Level | Description |
---|---|
trace | Finest grain logging, Mango has little of this although some of its libraries may use it. |
debug | For debugging problems, will fill up logs quickly for best results try to use the closest category to where your problem is when using this level. |
info | Default Logging Level for most of Mango |
warn | Capture Warning information |
error | Capture Errors |
fatal | Capture only disastrous level events. |
Log4j Category Name | Description |
---|---|
com.serotonin.m2m2 | All Serotonin Code for Mango |
com.infiniteautomation.mango | All IA Code for Mango |
com.serotonin.m2m2.db | Mango Database Code |
com.serotonin.m2m2.email | Mango Email Code |
com.serotonin.m2m2.i18n | Mango Translations |
com.serotonin.m2m2.rt | Mango Realtime Code (Data source,event detectors etc) |
com.serotonin.m2m2.web.mvc.rest | Mango REST Code |
com.serotonin.m2m2.rt.event | Event Detectors |
com.serotonin.m2m2.rt.maint | Backups and Purges |
com.serotonin.m2m2.rt.dataSource | Core Data Source code |
com.serotonin.m2m2.rt.publish | Core Publisher code |
com.serotonin.m2m2.rt.script | Core Java Scripting Code |
com.serotonin.ma.bacnet | BACnet Module |
com.serotonin.bacnet4j | BACnet Protocol |
com.serotonin.m2m2.snmp | SNMP Module |
org.snmp4j | SNMP Protocol |
com.infiniteautomation.brewersdashboard.rt | Brewers Dashboard DS and Alarms |