Skip to content

v0.2.50..v0.2.51 changeset ReportMissingElementsVisitor.cpp

Garret Voltz edited this page Jan 15, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/visitors/ReportMissingElementsVisitor.cpp b/hoot-core/src/main/cpp/hoot/core/visitors/ReportMissingElementsVisitor.cpp
index e595245..2fb3208 100644
--- a/hoot-core/src/main/cpp/hoot/core/visitors/ReportMissingElementsVisitor.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/visitors/ReportMissingElementsVisitor.cpp
@@ -38,7 +38,10 @@ namespace hoot
 
 HOOT_FACTORY_REGISTER(ElementVisitor, ReportMissingElementsVisitor)
 
-ReportMissingElementsVisitor::ReportMissingElementsVisitor(bool removeMissing, int maxReport) :
+ReportMissingElementsVisitor::ReportMissingElementsVisitor(const bool removeMissing,
+                                                           const Log::WarningLevel& logLevel,
+                                                           const int maxReport) :
+_logLevel(logLevel),
 _maxReport(maxReport),
 _missingCount(0),
 _removeMissing(removeMissing)
@@ -64,7 +67,7 @@ void ReportMissingElementsVisitor::_reportMissing(ElementId referer, ElementId m
 
   if (_missingCount < _maxReport)
   {
-    LOG_DEBUG(msg);
+    LOG_LEVEL(_logLevel, msg);
   }
   else
   {
@@ -73,7 +76,8 @@ void ReportMissingElementsVisitor::_reportMissing(ElementId referer, ElementId m
   _missingCount++;
   if (_missingCount == _maxReport)
   {
-    LOG_INFO(
+    LOG_LEVEL(
+      _logLevel,
       "Reached maximum number of missing element reports (" << _maxReport <<
       "). No longer reporting.");
   }
Clone this wiki locally