kill some verbose logs

This commit is contained in:
Grant Limberg 2021-08-19 09:21:52 -07:00
parent 576b4f03a5
commit 9eae444104
No known key found for this signature in database
GPG key ID: 2BA62CCABBB4095A
2 changed files with 5 additions and 6 deletions

View file

@ -1484,7 +1484,7 @@ void EmbeddedNetworkController::_request(
json &memberTags = member["tags"]; json &memberTags = member["tags"];
json &dns = network["dns"]; json &dns = network["dns"];
fprintf(stderr, "IP Assignment Pools for Network %s: %s\n", nwids, OSUtils::jsonDump(ipAssignmentPools, 2).c_str()); //fprintf(stderr, "IP Assignment Pools for Network %s: %s\n", nwids, OSUtils::jsonDump(ipAssignmentPools, 2).c_str());
if (metaData.getUI(ZT_NETWORKCONFIG_REQUEST_METADATA_KEY_RULES_ENGINE_REV,0) <= 0) { if (metaData.getUI(ZT_NETWORKCONFIG_REQUEST_METADATA_KEY_RULES_ENGINE_REV,0) <= 0) {
// Old versions with no rules engine support get an allow everything rule. // Old versions with no rules engine support get an allow everything rule.

View file

@ -232,7 +232,6 @@ bool PostgreSQL::isReady()
bool PostgreSQL::save(nlohmann::json &record,bool notifyListeners) bool PostgreSQL::save(nlohmann::json &record,bool notifyListeners)
{ {
fprintf(stderr, "PostgreSQL::save\n");
bool modified = false; bool modified = false;
try { try {
if (!record.is_object()) { if (!record.is_object()) {
@ -241,7 +240,7 @@ bool PostgreSQL::save(nlohmann::json &record,bool notifyListeners)
} }
const std::string objtype = record["objtype"]; const std::string objtype = record["objtype"];
if (objtype == "network") { if (objtype == "network") {
fprintf(stderr, "network save\n"); //fprintf(stderr, "network save\n");
const uint64_t nwid = OSUtils::jsonIntHex(record["id"],0ULL); const uint64_t nwid = OSUtils::jsonIntHex(record["id"],0ULL);
if (nwid) { if (nwid) {
nlohmann::json old; nlohmann::json old;
@ -257,17 +256,17 @@ bool PostgreSQL::save(nlohmann::json &record,bool notifyListeners)
std::string memberId = record["id"]; std::string memberId = record["id"];
const uint64_t nwid = OSUtils::jsonIntHex(record["nwid"],0ULL); const uint64_t nwid = OSUtils::jsonIntHex(record["nwid"],0ULL);
const uint64_t id = OSUtils::jsonIntHex(record["id"],0ULL); const uint64_t id = OSUtils::jsonIntHex(record["id"],0ULL);
fprintf(stderr, "member save %s-%s\n", networkId.c_str(), memberId.c_str()); //fprintf(stderr, "member save %s-%s\n", networkId.c_str(), memberId.c_str());
if ((id)&&(nwid)) { if ((id)&&(nwid)) {
nlohmann::json network,old; nlohmann::json network,old;
get(nwid,network,id,old); get(nwid,network,id,old);
if ((!old.is_object())||(!_compareRecords(old,record))) { if ((!old.is_object())||(!_compareRecords(old,record))) {
fprintf(stderr, "commit queue post\n"); //fprintf(stderr, "commit queue post\n");
record["revision"] = OSUtils::jsonInt(record["revision"],0ULL) + 1ULL; record["revision"] = OSUtils::jsonInt(record["revision"],0ULL) + 1ULL;
_commitQueue.post(std::pair<nlohmann::json,bool>(record,notifyListeners)); _commitQueue.post(std::pair<nlohmann::json,bool>(record,notifyListeners));
modified = true; modified = true;
} else { } else {
fprintf(stderr, "no change\n"); //fprintf(stderr, "no change\n");
} }
} }
} else { } else {