curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [8/8] git commit: wip
Date Wed, 28 May 2014 17:33:58 GMT
wip


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/598ad996
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/598ad996
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/598ad996

Branch: refs/heads/curator-rpc
Commit: 598ad996c4ab4aa77862088e3376039762e7e155
Parents: 49d0294
Author: randgalt <randgalt@apache.org>
Authored: Wed May 28 12:33:41 2014 -0500
Committer: randgalt <randgalt@apache.org>
Committed: Wed May 28 12:33:41 2014 -0500

----------------------------------------------------------------------
 .../java/org/apache/curator/x/rpc/CuratorProjectionServer.java    | 3 +++
 .../apache/curator/x/rpc/configuration/ConfigurationBuilder.java  | 3 +++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/598ad996/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java
b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java
index 2769e98..2dcb99e 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java
@@ -18,6 +18,7 @@
  */
 package org.apache.curator.x.rpc;
 
+import com.codahale.metrics.MetricRegistry;
 import com.facebook.swift.codec.ThriftCodecManager;
 import com.facebook.swift.service.ThriftEventHandler;
 import com.facebook.swift.service.ThriftServer;
@@ -104,6 +105,7 @@ public class CuratorProjectionServer
     {
         Preconditions.checkState(state.compareAndSet(State.LATENT, State.STARTED), "Already
started");
 
+        configuration.getLogging().configure(new MetricRegistry(), "curator-rpc");
         server.start();
 
         log.info("Server listening on port: " + configuration.getThrift().getPort());
@@ -117,6 +119,7 @@ public class CuratorProjectionServer
 
             rpcManager.close();
             server.close();
+            configuration.getLogging().stop();
 
             log.info("Stopped");
         }

http://git-wip-us.apache.org/repos/asf/curator/blob/598ad996/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConfigurationBuilder.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConfigurationBuilder.java
b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConfigurationBuilder.java
index 4d9fd60..56b4485 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConfigurationBuilder.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConfigurationBuilder.java
@@ -13,6 +13,8 @@ import io.dropwizard.logging.ConsoleAppenderFactory;
 import io.dropwizard.logging.FileAppenderFactory;
 import io.dropwizard.logging.LoggingFactory;
 import io.dropwizard.logging.SyslogAppenderFactory;
+import org.jboss.netty.logging.InternalLoggerFactory;
+import org.jboss.netty.logging.Slf4JLoggerFactory;
 import javax.validation.Validation;
 import javax.validation.ValidatorFactory;
 import java.io.ByteArrayInputStream;
@@ -27,6 +29,7 @@ public class ConfigurationBuilder
     static
     {
         LoggingFactory.bootstrap();
+        InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory());
     }
 
     public ConfigurationBuilder(String configurationSource)


Mime
View raw message