فهرست منبع

HPCC-18081 Suppress initial ERROR: UDP inErrors msg

Signed-off-by: Mark Kelly <mark.kelly@lexisnexisrisk.com>
Mark Kelly 7 سال پیش
والد
کامیت
0c435e5569
1فایلهای تغییر یافته به همراه9 افزوده شده و 1 حذف شده
  1. 9 1
      system/jlib/jdebug.cpp

+ 9 - 1
system/jlib/jdebug.cpp

@@ -2291,6 +2291,7 @@ public:
     {
         inErrorsCol = -1;
         prevErrors = 0;
+        firstCall = true;
     }
     bool reportSnmpInfo()
     {
@@ -2327,7 +2328,13 @@ public:
                     {
                         ok = true;
                         unsigned errors = strtoul(cols.item(inErrorsCol), NULL, 10);
-                        if (errors > prevErrors)
+                        if (firstCall)
+                        {
+                            firstCall = false;
+                            if (errors)
+                                LOG(MCoperatorWarning, unknownJob, "UDP Initial InError total: %u", errors);
+                        }
+                        else if (errors > prevErrors)
                             LOG(MCoperatorError, unknownJob, "UDP InErrors: %u (total %u)", errors-prevErrors, errors);
                         prevErrors = errors;
                     }
@@ -2343,6 +2350,7 @@ private:
     StringArray columnNames;
     int inErrorsCol;
     unsigned prevErrors;
+    bool firstCall;
 };
 
 static class CMemoryUsageReporter: public Thread