summaryrefslogtreecommitdiff
path: root/same/src
diff options
context:
space:
mode:
Diffstat (limited to 'same/src')
-rw-r--r--same/src/main/java/com/orbekk/same/SameController.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/same/src/main/java/com/orbekk/same/SameController.java b/same/src/main/java/com/orbekk/same/SameController.java
index c7e18fa..e1513e8 100644
--- a/same/src/main/java/com/orbekk/same/SameController.java
+++ b/same/src/main/java/com/orbekk/same/SameController.java
@@ -53,7 +53,22 @@ public class SameController {
}
};
+ public static void enableRpcLogging() {
+ java.util.logging.Level level = java.util.logging.Level.FINEST;
+ java.util.logging.Logger rpcLog = java.util.logging.Logger.getLogger(
+ com.orbekk.protobuf.RequestDispatcher.class.getName());
+ rpcLog.setLevel(level);
+ java.util.logging.Logger channelLog = java.util.logging.Logger.getLogger(
+ com.orbekk.protobuf.RpcChannel.class.getName());
+ channelLog.setLevel(level);
+ java.util.logging.Handler handler = new java.util.logging.ConsoleHandler();
+ handler.setLevel(level);
+ rpcLog.addHandler(handler);
+ channelLog.addHandler(handler);
+ }
+
public static SameController create(Configuration configuration) {
+ enableRpcLogging();
int pport = configuration.getInt("pport");
String myLocation = configuration.get("localIp") + ":" + pport;