mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-05-24 14:13:43 +02:00
dump member save output only on error
This commit is contained in:
parent
3cef1b0842
commit
6fa849c956
1 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue