Skip to content

Commit

Permalink
Reduce akka logs in PM and LS (#10967)
Browse files Browse the repository at this point in the history
* Reduce akka logs in PM and LS

After #10905 we suddenly got a lot of (useless) logs from akka in
project-manager and language-server. After some investigation it turned
out that akka-typed had a special configuration to enable logging in
akka using slf4j.
As we don't need the whole library for that I only stole the
configuration.

* nit

* licensing

* missing license files

(cherry picked from commit 8b30998)
  • Loading branch information
hubertp authored and jdunkerley committed Sep 10, 2024
1 parent f314635 commit d3b9a46
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 25 deletions.
43 changes: 22 additions & 21 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ lazy val `project-manager` = (project in file("lib/scala/project-manager"))
(Test / fork) := true,
(Compile / run / connectInput) := true,
commands += WithDebugCommand.withDebug,
libraryDependencies ++= akka ++ Seq(akkaTestkit % Test),
libraryDependencies ++= akka ++ Seq(akkaSLF4J, akkaTestkit % Test),
libraryDependencies ++= circe ++ helidon,
libraryDependencies ++= Seq(
"com.typesafe" % "config" % typesafeConfigVersion,
Expand Down Expand Up @@ -1521,26 +1521,27 @@ lazy val `language-server` = (project in file("engine/language-server"))
commands += WithDebugCommand.withDebug,
frgaalJavaCompilerSetting,
libraryDependencies ++= akka ++ circe ++ Seq(
"org.slf4j" % "slf4j-api" % slf4jVersion,
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingVersion,
"io.circe" %% "circe-generic-extras" % circeGenericExtrasVersion,
"io.circe" %% "circe-literal" % circeVersion,
"dev.zio" %% "zio" % zioVersion,
"com.google.flatbuffers" % "flatbuffers-java" % flatbuffersVersion,
"commons-io" % "commons-io" % commonsIoVersion,
"com.github.pureconfig" %% "pureconfig" % pureconfigVersion,
akkaTestkit % Test,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHTTPVersion % Test,
"org.scalatest" %% "scalatest" % scalatestVersion % Test,
"org.scalacheck" %% "scalacheck" % scalacheckVersion % Test,
"org.graalvm.truffle" % "truffle-api" % graalMavenPackagesVersion % "provided",
"org.graalvm.sdk" % "polyglot-tck" % graalMavenPackagesVersion % "provided",
"org.netbeans.api" % "org-openide-util-lookup" % netbeansApiVersion % "provided",
"org.eclipse.jgit" % "org.eclipse.jgit" % jgitVersion,
"org.bouncycastle" % "bcutil-jdk18on" % "1.76" % Test,
"org.bouncycastle" % "bcpkix-jdk18on" % "1.76" % Test,
"org.bouncycastle" % "bcprov-jdk18on" % "1.76" % Test,
"org.apache.tika" % "tika-core" % tikaVersion % Test
"org.slf4j" % "slf4j-api" % slf4jVersion,
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingVersion,
"io.circe" %% "circe-generic-extras" % circeGenericExtrasVersion,
"io.circe" %% "circe-literal" % circeVersion,
"dev.zio" %% "zio" % zioVersion,
"com.google.flatbuffers" % "flatbuffers-java" % flatbuffersVersion,
"commons-io" % "commons-io" % commonsIoVersion,
"com.github.pureconfig" %% "pureconfig" % pureconfigVersion,
akkaSLF4J,
akkaTestkit % Test,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHTTPVersion % Test,
"org.scalatest" %% "scalatest" % scalatestVersion % Test,
"org.scalacheck" %% "scalacheck" % scalacheckVersion % Test,
"org.graalvm.truffle" % "truffle-api" % graalMavenPackagesVersion % "provided",
"org.graalvm.sdk" % "polyglot-tck" % graalMavenPackagesVersion % "provided",
"org.netbeans.api" % "org-openide-util-lookup" % netbeansApiVersion % "provided",
"org.eclipse.jgit" % "org.eclipse.jgit" % jgitVersion,
"org.bouncycastle" % "bcutil-jdk18on" % "1.76" % Test,
"org.bouncycastle" % "bcpkix-jdk18on" % "1.76" % Test,
"org.bouncycastle" % "bcprov-jdk18on" % "1.76" % Test,
"org.apache.tika" % "tika-core" % tikaVersion % Test
),
Test / testOptions += Tests
.Argument(TestFrameworks.ScalaCheck, "-minSuccessfulTests", "1000"),
Expand Down
5 changes: 5 additions & 0 deletions distribution/engine/THIRD-PARTY/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.typesafe.akka.akka-protobuf-v3_2.13-2.6.20`.


'akka-slf4j_2.13', licensed under the Apache-2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.typesafe.akka.akka-slf4j_2.13-2.6.20`.


'akka-stream_2.13', licensed under the Apache-2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.typesafe.akka.akka-stream_2.13-2.6.20`.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
5 changes: 5 additions & 0 deletions distribution/project-manager/THIRD-PARTY/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.typesafe.akka.akka-protobuf-v3_2.13-2.6.20`.


'akka-slf4j_2.13', licensed under the Apache-2.0, is distributed with the project-manager.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.typesafe.akka.akka-slf4j_2.13-2.6.20`.


'akka-stream_2.13', licensed under the Apache-2.0, is distributed with the project-manager.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.typesafe.akka.akka-stream_2.13-2.6.20`.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
1 change: 1 addition & 0 deletions engine/language-server/src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ akka {
log-dead-letters = 1
log-dead-letters-during-shutdown = off
library-extensions = ["akka.stream.SystemMaterializer$"]
use-slf4j = on
}

logging-service {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ akka {
}
log-dead-letters = 1
log-dead-letters-during-shutdown = off
use-slf4j = on
}

logging-service {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
4 changes: 2 additions & 2 deletions tools/legal-review/engine/report-state
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
B8E190EAB26B4EEB4E2BB1F20210F07138FF38C839073ACA2204BE14329CB2AA
1F2015D6CAFE507B4166169412A30F9675DB75495403F29DA86CFAB4E8B87511
C718BB86771844038E1BB1BA727149161FF58ECBC8BC7D7F67184FFD380ED42D
A4D2615997541FBF4E5539AF13EB9B21FD029529A4E832E2204E9D4FC4460CAE
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
4 changes: 2 additions & 2 deletions tools/legal-review/project-manager/report-state
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1EB73A5C745136872667FB588773B0698E04F9F42ACF7A8BEFFB5BC0FDC36A0B
3D185D26D960B1B235E0F0CAE4ABACA05246566E65CAB48E1B65A1286CC31D93
840F3CE1999E3571BB8F34C26AD16ECCE957B9C04F1B0F1929B1F00767BDFE23
745841A9324FF45EBF74239F66CCC5C7E412D6270A7FAE08B1B1972B6C63A1B3
0

0 comments on commit d3b9a46

Please sign in to comment.