dump member save output only on error
Some checks failed
/ build_macos (push) Has been cancelled
/ build_windows (push) Has been cancelled
/ build_ubuntu (push) Has been cancelled

This commit is contained in:
Grant Limberg 2025-05-21 15:52:16 -07:00
parent 3cef1b0842
commit 6fa849c956

View file

@ -749,9 +749,6 @@ void CV2::commitThread()
memberId = config["id"]; memberId = config["id"];
networkId = config["nwid"]; networkId = config["nwid"];
std::string cfgDump = OSUtils::jsonDump(config, 2);
fprintf(stderr, "Member save %s-%s: %s\n", networkId.c_str(), memberId.c_str(), cfgDump.c_str());
std::string target = "NULL"; std::string target = "NULL";
if (!config["remoteTraceTarget"].is_null()) { if (!config["remoteTraceTarget"].is_null()) {
target = config["remoteTraceTarget"]; target = config["remoteTraceTarget"];
@ -850,6 +847,9 @@ void CV2::commitThread()
fprintf(stderr, "%s: Can't notify of change. Error parsing nwid or memberid: %llu-%llu\n", _myAddressStr.c_str(), (unsigned long long)nwidInt, (unsigned long long)memberidInt); fprintf(stderr, "%s: Can't notify of change. Error parsing nwid or memberid: %llu-%llu\n", _myAddressStr.c_str(), (unsigned long long)nwidInt, (unsigned long long)memberidInt);
} }
} catch (pqxx::data_exception &e) { } catch (pqxx::data_exception &e) {
std::string cfgDump = OSUtils::jsonDump(config, 2);
fprintf(stderr, "Member save %s-%s: %s\n", networkId.c_str(), memberId.c_str(), cfgDump.c_str());
const pqxx::sql_error *s=dynamic_cast<const pqxx::sql_error *>(&e); const pqxx::sql_error *s=dynamic_cast<const pqxx::sql_error *>(&e);
fprintf(stderr, "%s ERROR: Error updating member: %s\n", _myAddressStr.c_str(), e.what()); fprintf(stderr, "%s ERROR: Error updating member: %s\n", _myAddressStr.c_str(), e.what());
if (s) { if (s) {