Skip to content

Commit

Permalink
日志优化
Browse files Browse the repository at this point in the history
  • Loading branch information
闫逍旭 committed May 31, 2016
1 parent 3a8a9be commit 1846e80
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conf/reference.conf
Expand Up @@ -170,7 +170,7 @@ mp {
push-callback {
min:2
max:2
queue-size:1
queue-size:0
}
}
}
Expand Down
Expand Up @@ -41,7 +41,7 @@ public static void main(String[] args) throws Exception {

int index = (int) ((Math.random() % serverList.size()) * serverList.size());
ZKServerNode server = serverList.get(index);
server = new ZKServerNode("127.0.0.1", 3000, "127.0.0.1", null);
//server = new ZKServerNode("127.0.0.1", 3000, "127.0.0.1", null);
for (int i = 0; i < 1; i++) {
String clientVersion = "1.0." + i;
String osName = "android";
Expand Down
4 changes: 2 additions & 2 deletions mpush-zk/src/main/java/com/mpush/zk/ZKClient.java
Expand Up @@ -64,7 +64,7 @@ protected void doStart(Listener listener) throws Throwable {
throw new ZKException("init zk error, config=" + zkConfig);
}
initLocalCache(zkConfig.getLocalCachePath());
registerConnectionLostListener();
addConnectionStateListener();
listener.onSuccess(zkConfig.getHosts());
Logs.ZK.info("zk client start success, server lists is:{}", zkConfig.getHosts());
Logs.Console.error("init zk client success...");
Expand Down Expand Up @@ -117,7 +117,7 @@ public List<ACL> getAclForPath(final String path) {
}

// 注册连接状态监听器
private void registerConnectionLostListener() {
private void addConnectionStateListener() {
client.getConnectionStateListenable().addListener(new ConnectionStateListener() {
//TODO need close jvm?
@Override
Expand Down

0 comments on commit 1846e80

Please sign in to comment.