Bug-2704:Clustering: Fix akka-raft TestDriver logging to run with slf4j 05/20505/2
authorKamal Rameshan <kramesha@cisco.com>
Thu, 14 May 2015 00:19:07 +0000 (17:19 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Sat, 16 May 2015 22:58:40 +0000 (22:58 +0000)
Change-Id: I5634914b086d87557afb9a851c47958744301253
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
(cherry picked from commit 864f3c5bb156a7f6f6e2d91a6c7d43e916909e84)

opendaylight/md-sal/sal-akka-raft-example/pom.xml
opendaylight/md-sal/sal-akka-raft-example/src/main/resources/application.conf [new file with mode: 0644]
opendaylight/md-sal/sal-akka-raft-example/src/main/resources/simplelogger.properties [new file with mode: 0644]

index 8eb798b..71ad1ec 100644 (file)
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>sal-akka-raft</artifactId>
     </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+    </dependency>
   </dependencies>
 
   <build>
@@ -25,6 +30,9 @@
         <configuration>
           <instructions>
             <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
+            <Export-package>org.opendaylight.controller.cluster.example</Export-package>
+            <Import-Package>*</Import-Package>
+            <DynamicImport-Package>*</DynamicImport-Package>
           </instructions>
         </configuration>
       </plugin>
diff --git a/opendaylight/md-sal/sal-akka-raft-example/src/main/resources/application.conf b/opendaylight/md-sal/sal-akka-raft-example/src/main/resources/application.conf
new file mode 100644 (file)
index 0000000..b2132b8
--- /dev/null
@@ -0,0 +1,79 @@
+akka {
+
+    loglevel = "DEBUG"
+
+    actor {
+        # enable to test serialization only.
+        # serialize-messages = on
+
+        serializers {
+          java  = "akka.serialization.JavaSerializer"
+          proto = "akka.remote.serialization.ProtobufSerializer"
+        }
+
+        serialization-bindings {
+            "org.opendaylight.controller.cluster.raft.ReplicatedLogImplEntry" = java
+            "org.opendaylight.controller.cluster.notifications.RegisterRoleChangeListener" = java
+            "com.google.protobuf.Message" = proto
+            "com.google.protobuf.GeneratedMessage" = proto
+        }
+    }
+}
+
+raft-test {
+    akka {
+
+        loglevel = "DEBUG"
+
+        actor {
+            # enable to test serialization only.
+            # serialize-messages = on
+
+            provider = "akka.remote.RemoteActorRefProvider"
+
+            serializers {
+              java  = "akka.serialization.JavaSerializer"
+              proto = "akka.remote.serialization.ProtobufSerializer"
+            }
+
+            serialization-bindings {
+                "org.opendaylight.controller.cluster.raft.ReplicatedLogImplEntry" = java
+                "org.opendaylight.controller.cluster.notifications.RegisterRoleChangeListener" = java
+                "com.google.protobuf.Message" = proto
+                "com.google.protobuf.GeneratedMessage" = proto
+            }
+        }
+
+        remote {
+                        log-remote-lifecycle-events = off
+                        netty.tcp {
+                            hostname = "127.0.0.1"
+                            port = 2550
+                        }
+                    }
+    }
+}
+
+raft-test-listener {
+
+  akka {
+    loglevel = "DEBUG"
+
+    actor {
+        provider = "akka.remote.RemoteActorRefProvider"
+    }
+
+    remote {
+        log-remote-lifecycle-events = off
+        netty.tcp {
+            hostname = "127.0.0.1"
+            port = 2554
+        }
+    }
+
+    member-id = "member-1"
+  }
+}
+
+
+
diff --git a/opendaylight/md-sal/sal-akka-raft-example/src/main/resources/simplelogger.properties b/opendaylight/md-sal/sal-akka-raft-example/src/main/resources/simplelogger.properties
new file mode 100644 (file)
index 0000000..eafa2b0
--- /dev/null
@@ -0,0 +1 @@
+org.slf4j.simpleLogger.defaultLogLevel=debug
\ No newline at end of file