Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

  • Hy, I need to delete my email settings to avoid a lot of java exception due to server not reachable, how can I arrange this?
    I tried with blank fields but seems to be not possible

    0_1539188035051_d5e7ae2b-3071-4d17-b558-f9c9bc9e1328-immagine.png


  • Hi Antonio,

    That only applies to the "From" address field. You could leave the SMTP host blank, but you will still get the messages in the log. You could not send emails, which would seem to be the optimal solution (remove email handlers, turn users' send alarm levels to ignore, disable emails in reports, etc).

    Otherwise, you can suppress log message by modifying your Mango/classes/log4j2.xml file. In this case, the class is com.serotonin.m2m2.rt.maint.work.EmailWorkItem (in the exception message). In the section of <Loggers> you can add a line as the last AsyncLogger,

    <AsyncLogger includeLocation="true" name="com.serotonin.m2m2.rt.maint.work.EmailWorkItem" level="error"/>
    

    And reload the log4j configuration in the Log4J Reset section of the /system_settings.shtm page. You would also want to copy the log4j2.xml file to Mango/overrides/classes/ to have such a change persist an upgrade.

    Then you'll want to change the alarm level for a failed email send to Ignore on /ui/administration/system/system-alarm-levels


  • In Mango 2.8.4 there's this log4j.xml and no "loggers" tag

    <?xml version="1.0" encoding="UTF-8" ?>
    <!--
        Copyright (C) 2014 Infinite Automation Systems Inc. All rights reserved.
        @author Matthew Lohbihler
        
        
        ###############################################################################
         DO NOT MODIFY THIS FILE...
         
         Do not make changes to this file, because when you upgrade your core your 
         changes will be overwritten. Instead, copy this file to
         <MA_HOME>/overrides/classes/log4j.xml and make your changes to that file.
         The overrides directory will never be overwritten by an upgrade, so your
         customizations will be safe.
     
        ###############################################################################
        
        
    -->
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration>
      <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
          <param name="ConversionPattern" value="%-5p %d{ISO8601} (%C.%M:%L) - %m %n"/>
        </layout>
      </appender>
      
      <!-- 
        This will keep a maximum of 10 files at 1MB each 
        Acceptable Size post-fix: are MB,KB or GB
      -->
      <appender name="logfile" class="org.apache.log4j.RollingFileAppender">
        <param name="file" value="logs/ma.log"/>
        <param name="maxFileSize" value="5MB"/>
        <param name="maxBackupIndex" value="20"/>
        <layout class="org.apache.log4j.PatternLayout">
          <param name="ConversionPattern" value="%-5p %d{ISO8601} (%C.%M:%L) - %m %n"/>
        </layout>
      </appender>
      
      <!-- Use an Asynchronous appender to log in a separate thread and save mango time -->
      <appender name="async" class="org.apache.log4j.AsyncAppender">
        <param name="LocationInfo" value="true"/>
        <appender-ref ref="logfile"/>
      </appender>
      
      <!-- The application logger that will capture messages for display within the application -->
       <appender name="applicationConsole" class="com.serotonin.m2m2.rt.console.LoggingConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
          <param name="ConversionPattern" value="%-5p %d{ISO8601} (%C.%M:%L) - %m %n"/>
        </layout>
      </appender>
    
      <!-- Use an Asynchronous appender to log in a separate thread and save mango time -->
      <appender name="consoleAsync" class="org.apache.log4j.AsyncAppender">
        <param name="LocationInfo" value="true"/>
        <appender-ref ref="applicationConsole"/>
      </appender>
      
      
      <!-- 
        If you need additional information you can change any of these levels, the possible levels:
        ALL - turn on all logging
        DEBUG - Fine grained information events for debugging
        ERROR level designates error events that might still allow the application to continue running.
        FATAL level designates very severe error events that will presumably lead the application to abort.
        INFO level designates informational messages that highlight the progress of the application at coarse-grained level.
        OFF has the highest possible rank and is intended to turn off logging.
        TRACE Level designates finer-grained informational events than the DEBUG
        WARN level designates potentially harmful situations.
       -->
      
      <category name="org"><level value="error"/></category>
      <category name="org.directwebremoting"><level value="error"/></category>
      <category name="org.springframework"><level value="error"/></category>
      <category name="com.serotonin.db.spring.ExtendedJdbcTemplate"><level value="error"/></category>
      <category name="com.serotonin.m2m2"><level value="info"/></category>
      <category name="com.infiniteautomation"><level value="info"/></category>
    
      <root>
        <level value="error"/>
        <appender-ref ref="async"/>
        <appender-ref ref="stdout"/>
        <appender-ref ref="consoleAsync"/>
      </root>
    
    </log4j:configuration>
    
    

  • <category name="com.serotonin.m2m2.rt.maint.work.EmailWorkItem"><level value="error"/></category>