add log level control by ledger
This commit is contained in:
@@ -756,7 +756,7 @@ bool parseJsonMessageUD(const std::string& json_str, const std::string& output_d
|
||||
//json_data.tmnl_factory = item.value("manufacturer", "");
|
||||
//json_data.tmnl_status = item.value("status", "");
|
||||
json_data.dev_type = item.value("devType", "");
|
||||
json_data.DevLogLevel = item.value("DevLogLevel", "WARN");
|
||||
json_data.DevLogLevel = item.value("devLogLevel", "WARN");
|
||||
//json_data.dev_key = item.value("devKey", "");
|
||||
//json_data.dev_series = item.value("series", "");
|
||||
|
||||
@@ -773,7 +773,7 @@ bool parseJsonMessageUD(const std::string& json_str, const std::string& output_d
|
||||
json_data.mac = item.value("ip", "");
|
||||
//json_data.port = item.value("port", "");
|
||||
//json_data.timestamp = item.value("updateTime", "");
|
||||
json_data.Righttime = item.value("Righttime", "");
|
||||
json_data.Righttime = item.value("rightTime", "");
|
||||
|
||||
if (item.contains("monitorData") && item["monitorData"].is_array()) {
|
||||
for (const auto& monitor_item : item["monitorData"]) {
|
||||
@@ -784,7 +784,7 @@ bool parseJsonMessageUD(const std::string& json_str, const std::string& output_d
|
||||
m.monitor_name = monitor_item.value("name", "");
|
||||
m.logical_device_seq = monitor_item.value("lineNo", "");
|
||||
m.voltage_level = monitor_item.value("voltageLevel", "");
|
||||
m.LineLogLevel = monitor_item.value("LineLogLevel", "WARN");
|
||||
m.LineLogLevel = monitor_item.value("lineLogLevel", "WARN");
|
||||
// status 可能是数字,统一转成字符串存
|
||||
if (monitor_item.contains("status") && monitor_item["status"].is_number_integer())
|
||||
m.status = std::to_string(monitor_item["status"].get<int>());
|
||||
|
||||
Reference in New Issue
Block a user