File tree Expand file tree Collapse file tree 7 files changed +25
-19
lines changed
src/main/java/org/I0Itec/zkclient Expand file tree Collapse file tree 7 files changed +25
-19
lines changed Original file line number Diff line number Diff line change @@ -28,19 +28,19 @@ repositories {
2828 // }
2929}
3030dependencies {
31- compile (' log4j:log4j:1.2.15' ) {
32- exclude group : " com.sun.jdmk" , module : " jmxtools"
33- exclude group : " com.sun.jmx" , module : " jmxri"
34- exclude group : " javax.jms" , module : " jms"
35- }
3631 compile ' org.apache.zookeeper:zookeeper:3.4.8'
3732 compile ' org.slf4j:slf4j-api:1.6.1'
38- compile ' org.slf4j:slf4j-log4j12:1.6.1'
3933
34+ testCompile ' commons-io:commons-io:1.4'
4035 testCompile ' junit:junit:4.12'
36+ testCompile (' log4j:log4j:1.2.15' ) {
37+ exclude group : " com.sun.jdmk" , module : " jmxtools"
38+ exclude group : " com.sun.jmx" , module : " jmxri"
39+ exclude group : " javax.jms" , module : " jms"
40+ }
4141 testCompile ' org.assertj:assertj-core:2.0.0'
42- testCompile ' commons-io:commons-io:1.4'
4342 testCompile ' org.mockito:mockito-core:1.8.0'
43+ testCompile ' org.slf4j:slf4j-log4j12:1.6.1'
4444
4545 // dependencies of mockito
4646 testCompile files(' lib/objenesis-1.0.jar' , ' lib/hamcrest-core-1.1.jar' )
Original file line number Diff line number Diff line change 2020import java .util .concurrent .locks .ReentrantLock ;
2121
2222import org .I0Itec .zkclient .exception .ZkNoNodeException ;
23- import org .apache .log4j .Logger ;
23+ import org .slf4j .Logger ;
24+ import org .slf4j .LoggerFactory ;
2425
2526/**
2627 * @param <T>
2728 * The data type that is being watched.
2829 */
2930public final class ContentWatcher <T extends Object > implements IZkDataListener {
3031
31- private static final Logger LOG = Logger .getLogger (ContentWatcher .class );
32+ private static final Logger LOG = LoggerFactory .getLogger (ContentWatcher .class );
3233
3334 private Lock _contentLock = new ReentrantLock (true );
3435 private Condition _contentAvailable = _contentLock .newCondition ();
Original file line number Diff line number Diff line change 2929import java .util .concurrent .locks .Lock ;
3030import java .util .concurrent .locks .ReentrantLock ;
3131
32- import org .apache .log4j .Logger ;
32+ import org .slf4j .Logger ;
33+ import org .slf4j .LoggerFactory ;
3334
3435public class GatewayThread extends Thread {
3536
36- protected final static Logger LOG = Logger .getLogger (GatewayThread .class );
37+ protected final static Logger LOG = LoggerFactory .getLogger (GatewayThread .class );
3738
3839 private final int _port ;
3940 private final int _destinationPort ;
Original file line number Diff line number Diff line change 4141import org .I0Itec .zkclient .serialize .SerializableSerializer ;
4242import org .I0Itec .zkclient .serialize .ZkSerializer ;
4343import org .I0Itec .zkclient .util .ZkPathUtil ;
44- import org .apache .log4j .Logger ;
44+ import org .slf4j .Logger ;
45+ import org .slf4j .LoggerFactory ;
4546import org .apache .zookeeper .CreateMode ;
4647import org .apache .zookeeper .KeeperException ;
4748import org .apache .zookeeper .KeeperException .ConnectionLossException ;
6162 */
6263public class ZkClient implements Watcher {
6364
64- private final static Logger LOG = Logger .getLogger (ZkClient .class );
65+ private final static Logger LOG = LoggerFactory .getLogger (ZkClient .class );
6566 protected static final String JAVA_LOGIN_CONFIG_PARAM = "java.security.auth.login.config" ;
6667 protected static final String ZK_SASL_CLIENT = "zookeeper.sasl.client" ;
6768 protected static final String ZK_LOGIN_CONTEXT_NAME_KEY = "zookeeper.sasl.clientconfig" ;
Original file line number Diff line number Diff line change 2323import java .util .concurrent .locks .ReentrantLock ;
2424
2525import org .I0Itec .zkclient .exception .ZkException ;
26- import org .apache .log4j .Logger ;
26+ import org .slf4j .Logger ;
27+ import org .slf4j .LoggerFactory ;
2728import org .apache .zookeeper .CreateMode ;
2829import org .apache .zookeeper .KeeperException ;
2930import org .apache .zookeeper .Op ;
3738
3839public class ZkConnection implements IZkConnection {
3940
40- private static final Logger LOG = Logger .getLogger (ZkConnection .class );
41+ private static final Logger LOG = LoggerFactory .getLogger (ZkConnection .class );
4142
4243 /** It is recommended to use quite large sessions timeouts for ZooKeeper. */
4344 private static final int DEFAULT_SESSION_TIMEOUT = 30000 ;
Original file line number Diff line number Diff line change 2020import java .util .concurrent .atomic .AtomicInteger ;
2121
2222import org .I0Itec .zkclient .exception .ZkInterruptedException ;
23- import org .apache .log4j .Logger ;
23+ import org .slf4j .Logger ;
24+ import org .slf4j .LoggerFactory ;
2425
2526/**
2627 * All listeners registered at the {@link ZkClient} will be notified from this event thread. This is to prevent
3233 */
3334class ZkEventThread extends Thread {
3435
35- private static final Logger LOG = Logger .getLogger (ZkEventThread .class );
36+ private static final Logger LOG = LoggerFactory .getLogger (ZkEventThread .class );
3637
3738 private BlockingQueue <ZkEvent > _events = new LinkedBlockingQueue <ZkEvent >();
3839
Original file line number Diff line number Diff line change 2525
2626import org .I0Itec .zkclient .exception .ZkException ;
2727import org .I0Itec .zkclient .exception .ZkInterruptedException ;
28- import org .apache .log4j .Logger ;
2928import org .apache .zookeeper .server .NIOServerCnxnFactory ;
3029import org .apache .zookeeper .server .ZooKeeperServer ;
30+ import org .slf4j .Logger ;
31+ import org .slf4j .LoggerFactory ;
3132
3233public class ZkServer {
3334
34- private final static Logger LOG = Logger .getLogger (ZkServer .class );
35+ private final static Logger LOG = LoggerFactory .getLogger (ZkServer .class );
3536
3637 public static final int DEFAULT_PORT = 2181 ;
3738 public static final int DEFAULT_TICK_TIME = 5000 ;
You can’t perform that action at this time.
0 commit comments