You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2022/10/31 09:36:56 UTC

[incubator-pekko-samples] 01/02: Log remote lifecycle events

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 <ar...@bzzt.net>
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://ClusterSystem@127.0.0.1:2551",
       "akka://ClusterSystem@127.0.0.1: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: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org