-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Move logging to ZIO's official logging library
Signed-off-by: Jordan Hall <[email protected]>
- Loading branch information
1 parent
a2b969c
commit 67cc3f8
Showing
8 changed files
with
86 additions
and
606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
val orgName = "Marshall Wace" | ||
val year = 2023 | ||
|
||
ThisBuild / scalaVersion := "3.3.1" | ||
ThisBuild / version := "0.1.0-SNAPSHOT" | ||
ThisBuild / organization := "com.mwam.kafkakewl" | ||
ThisBuild / organizationName := orgName | ||
ThisBuild / startYear := Some(year) | ||
|
||
ThisBuild / scalacOptions ++= Seq( | ||
"-Xmax-inlines", "64", | ||
ThisBuild / scalaVersion := "3.3.1" | ||
ThisBuild / version := "0.1.0-SNAPSHOT" | ||
ThisBuild / organization := "com.mwam.kafkakewl" | ||
ThisBuild / organizationName := orgName | ||
ThisBuild / startYear := Some(year) | ||
|
||
ThisBuild / scalacOptions ++= Seq( | ||
"-Xmax-inlines", | ||
"64", | ||
"-Yretain-trees", // so that zio-json supports default values | ||
"-Wunused:imports", "-Wunused:params", "-deprecation", "-feature" | ||
"-Wunused:imports", | ||
"-Wunused:params", | ||
"-deprecation", | ||
"-feature" | ||
) | ||
|
||
// Have to do this for the root project and enable it for the sub-projects as well as setting the headerLicense for them. | ||
disablePlugins(HeaderPlugin) | ||
|
||
val license = Some(HeaderLicense.Custom( | ||
s"""SPDX-FileCopyrightText: $year $orgName <[email protected]> | ||
val license = Some(HeaderLicense.Custom(s"""SPDX-FileCopyrightText: $year $orgName <[email protected]> | ||
| | ||
|SPDX-License-Identifier: Apache-2.0 | ||
|""".stripMargin | ||
)) | ||
|""".stripMargin)) | ||
|
||
val logbackVersion = "1.4.11" | ||
val logbackContribJsonVersion = "0.1.5" | ||
|
@@ -44,7 +46,7 @@ val tapir = Seq( | |
"com.softwaremill.sttp.tapir" %% "tapir-zio-http-server" % tapirVersion, | ||
"com.softwaremill.sttp.tapir" %% "tapir-json-zio" % tapirVersion, | ||
"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % tapirVersion, | ||
"com.softwaremill.sttp.tapir" %% "tapir-zio-metrics" % tapirVersion, | ||
"com.softwaremill.sttp.tapir" %% "tapir-zio-metrics" % tapirVersion | ||
) | ||
|
||
val tapirCore = Seq( | ||
|
@@ -63,7 +65,7 @@ val zio = Seq( | |
"dev.zio" %% "zio-test-junit" % zioVersion % Test, | ||
"dev.zio" %% "zio-json" % zioJsonVersion, | ||
"dev.zio" %% "zio-logging" % zioLoggingVersion, | ||
"dev.zio" %% "zio-logging-slf4j" % zioLoggingVersion, | ||
"dev.zio" %% "zio-logging-slf4j2-bridge" % zioLoggingVersion, | ||
"dev.zio" %% "zio-kafka" % zioKafkaVersion, | ||
"com.softwaremill.sttp.client3" %% "zio-json" % tapirZioJsonVersion % Test | ||
) | ||
|
@@ -75,18 +77,13 @@ val config = Seq( | |
) | ||
|
||
val circeYaml = Seq( | ||
"io.circe" %% "circe-yaml" % circeYamlVersion | ||
"io.circe" %% "circe-yaml" % circeYamlVersion | ||
) | ||
|
||
val kafkaClient = Seq( | ||
"org.apache.kafka" % "kafka-clients" % kafkaClientVersion | ||
) | ||
|
||
val logging = Seq( | ||
"ch.qos.logback" % "logback-classic" % logbackVersion, | ||
"ch.qos.logback.contrib" % "logback-jackson" % logbackContribJsonVersion | ||
) | ||
|
||
val telemetry = Seq( | ||
"dev.zio" %% "zio-opentelemetry" % zioTelemetryVersion, | ||
"io.opentelemetry" % "opentelemetry-api" % openTelemetryVersion, | ||
|
@@ -95,7 +92,7 @@ val telemetry = Seq( | |
"io.opentelemetry" % "opentelemetry-extension-trace-propagators" % openTelemetryVersion, | ||
"io.opentelemetry" % "opentelemetry-semconv" % s"$openTelemetryVersion-alpha", | ||
"io.opentelemetry" % "opentelemetry-sdk-extension-autoconfigure" % openTelemetryVersion, | ||
"io.grpc" % "grpc-netty-shaded" % openTelemetryGrpcVersion, | ||
"io.grpc" % "grpc-netty-shaded" % openTelemetryGrpcVersion | ||
) | ||
|
||
val tests = Seq( | ||
|
@@ -108,7 +105,7 @@ lazy val utils = project | |
.settings( | ||
name := "kafkakewl-utils", | ||
headerLicense := license, | ||
libraryDependencies ++= logging ++ zio ++ config | ||
libraryDependencies ++= zio ++ config | ||
) | ||
|
||
lazy val domain = project | ||
|
@@ -145,7 +142,7 @@ lazy val deploy = project | |
// disabling scalaDoc fixes it (it's needed because stage wants to generate scalaDoc) | ||
packageDoc / publishArtifact := false, | ||
Compile / mainClass := Some("com.mwam.kafkakewl.deploy.Main"), | ||
libraryDependencies ++= tapir ++ tapirCore ++ config ++ zio ++ tests ++ logging, | ||
libraryDependencies ++= tapir ++ tapirCore ++ config ++ zio ++ tests, | ||
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework")) | ||
) | ||
|
||
|
@@ -162,6 +159,6 @@ lazy val metrics = project | |
// disabling scalaDoc fixes it (it's needed because stage wants to generate scalaDoc) | ||
packageDoc / publishArtifact := false, | ||
Compile / mainClass := Some("com.mwam.kafkakewl.metrics.Main"), | ||
libraryDependencies ++= tapir ++ tapirCore ++ config ++ zio ++ tests ++ logging, | ||
libraryDependencies ++= tapir ++ tapirCore ++ config ++ zio ++ tests, | ||
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework")) | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.