-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69b4afc
commit 8f32fb6
Showing
9 changed files
with
40 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,15 +19,16 @@ | |
package streaming.common.zk; | ||
|
||
import com.google.inject.Inject; | ||
import net.csdn.common.logging.CSLogger; | ||
import net.csdn.common.logging.Loggers; | ||
import net.csdn.common.settings.Settings; | ||
import org.I0Itec.zkclient.IZkDataListener; | ||
import org.apache.log4j.Logger; | ||
|
||
/** | ||
* 7/7/16 WilliamZhu([email protected]) | ||
*/ | ||
public class ZKClient { | ||
private Logger logger = Logger.getLogger(ZKClient.class); | ||
private CSLogger logger = Loggers.getLogger(ZKClient.class); | ||
private ZKConfUtil zkConfUtil; | ||
|
||
@Inject | ||
|
@@ -129,16 +130,7 @@ public boolean addListenerAndInit(String confName, final ConfCallBack confCallBa | |
confCallBack.setConf(zkConfUtil.getConf(data)); | ||
|
||
} catch (Exception e) { | ||
if (logger.isDebugEnabled()) { | ||
logger.debug( | ||
String.format( | ||
"addListenerAndInit Error!!!\n confName: %s \n confCallBack: %s \n exception: %s", | ||
confName, | ||
confCallBack, | ||
e | ||
) | ||
); | ||
} | ||
logger.error("Error: {}", e); | ||
} | ||
|
||
|
||
|
@@ -179,7 +171,7 @@ public void main(String[] args) throws InterruptedException { | |
@Override | ||
public void setConf(String conf) { | ||
if (logger.isInfoEnabled()) { | ||
logger.info(String.format("conf: %s", conf)); | ||
logger.info("conf: {}", conf); | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters