Skip to content

Commit

Permalink
Cleanup dependencies and explicitly use akka slf4j
Browse files Browse the repository at this point in the history
We we previously relying on akka typed to be on the classpath so that
akka automatically logged into slf4j implementation:
- https://doc.akka.io/docs/akka/current/logging.html

However, that dependency was not being used for anything else. I think
it is more correct to be explicit on our logging purposes and explicitly
use akka-slf4j dependency and configure the application accordingly
  • Loading branch information
thyandrecardoso committed Oct 5, 2023
1 parent 6005faa commit 48f0f4b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions elasticsearch/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ libraryDependencies ++= Seq(
Elastic4sClientEsJava,
Elastic4sCore,
ElasticsearchRestClient,
AkkaActorTestkitTyped % Test,
AkkaHttpTestkit % Test,
AkkaSlf4J % Test,
AkkaTestkitSpecs2Classic % Test,
Elastic4sTestkit % Test,
ElasticsearchClusterRunner % Test,
Log4JCore % Test,
Log4JSlf4j % Test,
Specs2Core % Test,
Specs2ScalaCheck % Test
Specs2Core % Test
)
2 changes: 2 additions & 0 deletions elasticsearch/src/test/resources/application.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
akka {
loggers = ["akka.event.slf4j.Slf4jLogger"]
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
log-dead-letters = 0
log-dead-letters-during-shutdown = off
}
1 change: 1 addition & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ object Dependencies {
val AkkaHttp = "com.typesafe.akka" %% "akka-http" % Versions.AkkaHttp
val AkkaHttpCore = "com.typesafe.akka" %% "akka-http-core" % Versions.AkkaHttp
val AkkaHttpTestkit = "com.typesafe.akka" %% "akka-http-testkit" % Versions.AkkaHttp
val AkkaSlf4J = "com.typesafe.akka" %% "akka-slf4j" % Versions.Akka
val AkkaStream = "com.typesafe.akka" %% "akka-stream" % Versions.Akka
val AkkaStreamTestkit = "com.typesafe.akka" %% "akka-stream-testkit" % Versions.Akka
val AkkaTestkit = "com.typesafe.akka" %% "akka-testkit" % Versions.Akka
Expand Down

0 comments on commit 48f0f4b

Please sign in to comment.