This is an automated email from the ASF dual-hosted git repository. fanningpj pushed a commit to branch logClusterLifecycleEvents in repository https://gitbox.apache.org/repos/asf/incubator-pekko-samples.git
commit 3fc9890a1114068fd0a0104af0fa541a59406cec Author: Arnout Engelen <[email protected]> AuthorDate: Tue Aug 28 14:57:35 2018 +0200 Log remote lifecycle events --- akka-sample-cluster-scala/build.sbt | 2 ++ .../src/main/resources/application.conf | 9 +++++++++ akka-sample-cluster-scala/src/main/resources/logback.xml | 15 +++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/akka-sample-cluster-scala/build.sbt b/akka-sample-cluster-scala/build.sbt index a18d7a7..0331544 100644 --- a/akka-sample-cluster-scala/build.sbt +++ b/akka-sample-cluster-scala/build.sbt @@ -14,6 +14,8 @@ lazy val `akka-sample-cluster-scala` = project javaOptions in run ++= Seq("-Xms128m", "-Xmx1024m", "-Djava.library.path=./target/native"), libraryDependencies ++= Seq( "com.typesafe.akka" %% "akka-actor" % akkaVersion, + "ch.qos.logback" % "logback-classic" % "1.2.3", + "com.typesafe.akka" %% "akka-slf4j" % akkaVersion, "com.typesafe.akka" %% "akka-remote" % akkaVersion, "com.typesafe.akka" %% "akka-cluster" % akkaVersion, "com.typesafe.akka" %% "akka-cluster-metrics" % akkaVersion, diff --git a/akka-sample-cluster-scala/src/main/resources/application.conf b/akka-sample-cluster-scala/src/main/resources/application.conf index 3e48b29..8a44730 100644 --- a/akka-sample-cluster-scala/src/main/resources/application.conf +++ b/akka-sample-cluster-scala/src/main/resources/application.conf @@ -1,8 +1,12 @@ akka { + loglevel = debug + loggers = ["akka.event.slf4j.Slf4jLogger"] + logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" actor { provider = cluster } remote { + log-remote-lifecycle-events = debug netty.tcp { hostname = "127.0.0.1" port = 0 @@ -16,8 +20,13 @@ akka { cluster { seed-nodes = [ +<<<<<<< Updated upstream "akka://[email protected]:2551", "akka://[email protected]:2552"] +======= + "akka.tcp://ClusterSystem@my_localhost:2551", + "akka.tcp://ClusterSystem@my_localhost:2552"] +>>>>>>> Stashed changes # auto downing is NOT safe for production deployments. # you may want to use it during development, read more about it in the docs. diff --git a/akka-sample-cluster-scala/src/main/resources/logback.xml b/akka-sample-cluster-scala/src/main/resources/logback.xml new file mode 100644 index 0000000..a2f9623 --- /dev/null +++ b/akka-sample-cluster-scala/src/main/resources/logback.xml @@ -0,0 +1,15 @@ +<configuration> +<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <!-- encoders are assigned the type + ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> + </encoder> + </appender> + + <logger name="akka.remote.Remoting" level="DEBUG"/> + + <root level="WARNING"> + <appender-ref ref="STDOUT" /> + </root> +</configuration> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
