mirror of
https://gitee.com/BDWare/agent-backend
synced 2025-01-10 01:44:14 +00:00
feat: update logs
optimize logs in NodeCenterClientController; reformat CMHttpServer
This commit is contained in:
parent
55d7453ab6
commit
33f8bda665
@ -156,8 +156,9 @@ public class CMHttpServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static String[] parseStrAsList(String str) {
|
private static String[] parseStrAsList(String str) {
|
||||||
if (str == null)
|
if (str == null) {
|
||||||
return new String[]{};
|
return new String[]{};
|
||||||
|
}
|
||||||
return str.split(",");
|
return str.split(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,22 +383,18 @@ public class NodeCenterClientController implements NodeCenterConn {
|
|||||||
jo.get("pubKey").getAsString(), jo.get("masterAddress").getAsString());
|
jo.get("pubKey").getAsString(), jo.get("masterAddress").getAsString());
|
||||||
NetworkManager.instance.connectToAgent(jo.get("pubKey").getAsString(), null);
|
NetworkManager.instance.connectToAgent(jo.get("pubKey").getAsString(), null);
|
||||||
LOGGER.info(
|
LOGGER.info(
|
||||||
"[CMClientController] "
|
String.format("the master of contract %s: pubKey=%s address=%s",
|
||||||
+ contractID
|
contractID,
|
||||||
+ " 查询master结果为 pubKey="
|
jo.get("pubKey").getAsString(),
|
||||||
+ jo.get("pubKey").getAsString()
|
jo.get("masterAddress").getAsString()));
|
||||||
+ " 地址为"
|
|
||||||
+ jo.get("masterAddress").getAsString());
|
|
||||||
contractID2PubKey.put(contractID, jo.get("pubKey").getAsString());
|
contractID2PubKey.put(contractID, jo.get("pubKey").getAsString());
|
||||||
return jo.get("pubKey").getAsString();
|
return jo.get("pubKey").getAsString();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
LOGGER.warn("the master of contract " + contractID + " is null! " + e.getMessage());
|
||||||
LOGGER.info("[CMClientController] " + contractID + " 查询master结果为 null");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
LOGGER.warn("the master of contract " + contractID + " is null! " + e.getMessage());
|
||||||
LOGGER.info("[CMClientController] " + contractID + " 查询master结果为 null");
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user