-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.47..v0.2.48 changeset ReportMissingElementsVisitor.cpp
Garret Voltz edited this page Sep 27, 2019
·
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 66c7f46..e595245 100644
--- a/hoot-core/src/main/cpp/hoot/core/visitors/ReportMissingElementsVisitor.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/visitors/ReportMissingElementsVisitor.cpp
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2015, 2016, 2017, 2018 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
*/
#include "ReportMissingElementsVisitor.h"
@@ -52,21 +52,30 @@ void ReportMissingElementsVisitor::setConfiguration(const Settings& conf)
void ReportMissingElementsVisitor::_reportMissing(ElementId referer, ElementId missing)
{
+ QString msg;
+ if (_removeMissing)
+ {
+ msg = "Removing missing " + missing.toString() + " in " + referer.toString() + ".";
+ }
+ else
+ {
+ msg = "Missing " + missing.toString() + " in " + referer.toString() + ".";
+ }
+
if (_missingCount < _maxReport)
{
- if (_removeMissing)
- {
- LOG_INFO("Removing missing " << missing.toString() << " in " << referer.toString() << ".");
- }
- else
- {
- LOG_INFO("Missing " << missing.toString() << " in " << referer.toString() << ".");
- }
+ LOG_DEBUG(msg);
+ }
+ else
+ {
+ LOG_TRACE(msg);
}
_missingCount++;
if (_missingCount == _maxReport)
{
- LOG_INFO("Reached maximum number of missing reports. No longer reporting.");
+ LOG_INFO(
+ "Reached maximum number of missing element reports (" << _maxReport <<
+ "). No longer reporting.");
}
}
@@ -129,8 +138,10 @@ void ReportMissingElementsVisitor::_visitRw(ElementType type, long id)
}
if (newNids.size() != w->getNodeCount())
{
+ LOG_TRACE("Way nodes size before: " << w->getNodeCount());
w->setNodes(newNids);
- }
+ LOG_TRACE("Way nodes size after: " << w->getNodeCount());
+ }
}
else if (type == ElementType::Relation)
{
@@ -151,7 +162,9 @@ void ReportMissingElementsVisitor::_visitRw(ElementType type, long id)
}
if (newEntries.size() != r->getMembers().size())
{
+ LOG_TRACE("Relation members size before: " << r->getMembers().size());
r->setMembers(newEntries);
+ LOG_TRACE("Relation members size after: " << r->getMembers().size());
}
}
}