Tôi có tập tin build.sbt sau:Làm cách nào để tắt ghi nhật ký cho một phụ thuộc cụ thể trong SBT?
version := "0.1"
scalaVersion := "2.10.0-RC1"
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8")
resolvers ++= Seq(
"sonatype releases" at "https://oss.sonatype.org/content/repositories/releases/",
"sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
"typesafe repo" at "http://repo.typesafe.com/typesafe/releases/",
"spray repo" at "http://repo.spray.io/"
)
libraryDependencies ++= Seq(
"io.spray" % "spray-can" % "1.1-M4.2"
,"io.spray" % "spray-routing" % "1.1-M4.2"
,"io.spray" % "spray-testkit" % "1.1-M4.2"
,"io.spray" %% "spray-json" % "1.2.2" cross CrossVersion.full
,"com.typesafe.akka" %% "akka-actor" % "2.1.0-RC1" cross CrossVersion.full
,"org.specs2" %% "specs2" % "1.12.2" % "test" cross CrossVersion.full
,"com.typesafe" % "slick_2.10.0-RC1" % "0.11.2"
,"com.h2database" % "h2" % "1.3.166"
,"org.xerial" % "sqlite-jdbc" % "3.6.20"
,"org.slf4j" % "slf4j-api" % "1.6.4"
,"ch.qos.logback" % "logback-classic" % "1.0.7"
,"org.specs2" % "specs2_2.10.0-RC1" % "1.12.2" % "test"
,"junit" % "junit" % "4.8.1" % "test"
)
Làm thế nào để kích hoạt báo cáo mức độ DEBUG đăng ký (hiện hành) dự án của riêng tôi, nhưng vô hiệu hóa nó cho người khác. Trong trường hợp này, tôi không muốn thấy kết quả gỡ lỗi của thư viện Slick, nhưng vẫn muốn xem việc ghi nhật ký gỡ lỗi cho dự án của riêng tôi.
Trong log4j.xml bạn có thể cấu hình mức nhật ký cho mỗi thư viện. – Rajesh