Skip to content

Commit

Permalink
modify loging level
Browse files Browse the repository at this point in the history
  • Loading branch information
knightliao committed Sep 14, 2015
1 parent d77ed10 commit 42f54fe
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ public Object decideAccess(ProceedingJoinPoint pjp, DisconfFileItem disconfFileI
// 请求仓库配置数据
//
DisconfStoreProcessor disconfStoreProcessor =
DisconfStoreProcessorFactory.getDisconfStoreFileProcessor();
DisconfStoreProcessorFactory.getDisconfStoreFileProcessor();
Object ret = disconfStoreProcessor.getConfig(disconfFile.filename(), disconfFileItem.name());
if (ret != null) {
LOGGER.info("using disconf store value: " + disconfFile.filename() + " (" + disconfFileItem.name() +
" , " + ret + ")");
LOGGER.debug("using disconf store value: " + disconfFile.filename() + " ("
+ disconfFileItem.name() +
" , " + ret + ")");
return ret;
}
}
Expand Down Expand Up @@ -104,7 +105,7 @@ public Object decideAccess(ProceedingJoinPoint pjp, DisconfItem disconfItem) thr
DisconfStoreProcessor disconfStoreProcessor = DisconfStoreProcessorFactory.getDisconfStoreItemProcessor();
Object ret = disconfStoreProcessor.getConfig(null, disconfItem.key());
if (ret != null) {
LOGGER.info("using disconf store value: (" + disconfItem.key() + " , " + ret + ")");
LOGGER.debug("using disconf store value: (" + disconfItem.key() + " , " + ret + ")");
return ret;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void monitorMaster() {
}

LOGGER.debug("monitor path: (" + monitorPath + "," + keyName + "," + disConfigTypeEnum.getModelName() +
") has been added!");
") has been added!");
}

/**
Expand All @@ -83,8 +83,8 @@ public void process(WatchedEvent event) {

try {

LOGGER.info("============GOT UPDATE EVENT " + event.toString() + ": (" + monitorPath + "," + keyName +
"," + disConfigTypeEnum.getModelName() + ")======================");
LOGGER.info("============GOT UPDATE EVENT " + event.toString() + ": (" + monitorPath + "," + keyName
+ "," + disConfigTypeEnum.getModelName() + ")======================");

// 调用回调函数, 回调函数里会重新进行监控
callback();
Expand All @@ -101,14 +101,14 @@ public void process(WatchedEvent event) {
if (event.getState() == KeeperState.Disconnected) {

if (!debug) {
LOGGER.warn("============GOT Disconnected EVENT " + event.toString() + ": (" + monitorPath + "," +
keyName +
"," + disConfigTypeEnum.getModelName() + ")======================");
LOGGER.warn("============GOT Disconnected EVENT " + event.toString() + ": (" + monitorPath + ","
+ keyName + "," + disConfigTypeEnum.getModelName() + ")======================");
} else {
LOGGER.info("============DEBUG MODE: GOT Disconnected EVENT " + event.toString() + ": (" + monitorPath +
"," +
keyName +
"," + disConfigTypeEnum.getModelName() + ")======================");
LOGGER.debug("============DEBUG MODE: GOT Disconnected EVENT " + event.toString() + ": (" +
monitorPath +
"," +
keyName +
"," + disConfigTypeEnum.getModelName() + ")======================");
}
}

Expand All @@ -119,18 +119,16 @@ public void process(WatchedEvent event) {

if (!debug) {

LOGGER
.error("============GOT Expired " + event.toString() + ": (" + monitorPath + "," + keyName + "," +
disConfigTypeEnum.getModelName() + ")======================");
LOGGER.error("============GOT Expired " + event.toString() + ": (" + monitorPath + "," + keyName
+ "," + disConfigTypeEnum.getModelName() + ")======================");

// 重新连接
ZookeeperMgr.getInstance().reconnect();

callback();
} else {
LOGGER.info("============DEBUG MODE: GOT Expired " + event.toString() + ": (" + monitorPath + "," +
"" + keyName + "," +
disConfigTypeEnum.getModelName() + ")======================");
LOGGER.debug("============DEBUG MODE: GOT Expired " + event.toString() + ": (" + monitorPath + ","
+ "" + keyName + "," + disConfigTypeEnum.getModelName() + ")======================");
}
}
}
Expand Down

0 comments on commit 42f54fe

Please sign in to comment.