Skip to content

Instantly share code, notes, and snippets.

@firehooper
Last active December 23, 2021 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save firehooper/f883c31840010ffeea3a67f2f23f53ea to your computer and use it in GitHub Desktop.
Save firehooper/f883c31840010ffeea3a67f2f23f53ea to your computer and use it in GitHub Desktop.
scala-logging-logback
import sbt._
object Dependencies {
object Versions {
val slf4jV = "1.7.32"
val logbackV = "1.2.10"
val scalaLoggingV = "3.9.4"
}
val exclusions = Seq(
ExclusionRule("log4j"),
ExclusionRule("org.apache.logging.log4j"),
ExclusionRule("commons-logging"),
ExclusionRule("org.slf4j", "slf4j-api"),
)
val libraryDependencies = {
import Versions._
Seq(
"ch.qos.logback" % "logback-core" % logbackV % "compile",
"ch.qos.logback" % "logback-classic" % logbackV % "compile",
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingV % "compile",
// insert other deps
).map { _.excludeAll(exclusions: _*) } ++ Seq(
"org.slf4j" % "log4j-over-slf4j" % slf4jV % "compile" force(),
"org.slf4j" % "jcl-over-slf4j" % slf4jV % "compile" force(),
"org.slf4j" % "slf4j-api" % slf4jV % "compile" force(),
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment