Skip to content

Commit

Permalink
#275 Disable log4j2 to use slf4j
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Sep 8, 2017
1 parent f36b141 commit c363609
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
9 changes: 9 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
name := "TheHive"

lazy val thehiveBackend = (project in file("thehive-backend"))
.enablePlugins(PlayScala)
.settings(publish := {})

lazy val thehiveMetrics = (project in file("thehive-metrics"))
.enablePlugins(PlayScala)
.dependsOn(thehiveBackend)
.settings(publish := {})

lazy val thehiveMisp = (project in file("thehive-misp"))
.enablePlugins(PlayScala)
.dependsOn(thehiveBackend)
.settings(publish := {})

lazy val thehiveCortex = (project in file("thehive-cortex"))
.enablePlugins(PlayScala)
.dependsOn(thehiveBackend)
.settings(publish := {})
.settings(SbtScalariform.scalariformSettings: _*)
Expand All @@ -26,6 +30,11 @@ lazy val thehive = (project in file("."))
.settings(PublishToBinTray.settings: _*)
.settings(Release.settings: _*)


// Redirect logs from ElasticSearch (which uses log4j2) to slf4j
libraryDependencies += "org.apache.logging.log4j" % "log4j-to-slf4j" % "2.9.0"
excludeDependencies += "org.apache.logging.log4j" % "log4j-core"

lazy val rpmPackageRelease = (project in file("package/rpm-release"))
.enablePlugins(RpmPlugin)
.settings(
Expand Down
7 changes: 2 additions & 5 deletions thehive-backend/app/services/TheHiveAuthSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ package services
import javax.inject.{ Inject, Singleton }

import scala.collection.immutable
import scala.concurrent.{ ExecutionContext, Future }
import scala.util.{ Failure, Success }
import scala.concurrent.ExecutionContext

import play.api.mvc.RequestHeader
import play.api.{ Configuration, Logger }

import org.elastic4play.AuthenticationError
import org.elastic4play.services.{ AuthContext, AuthSrv }
import org.elastic4play.services.AuthSrv
import org.elastic4play.services.auth.MultiAuthSrv

object TheHiveAuthSrv {
Expand Down
2 changes: 1 addition & 1 deletion thehive-backend/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ libraryDependencies ++= Seq(
Library.reflections
)

enablePlugins(PlayScala)
play.sbt.routes.RoutesKeys.routesImport -= "controllers.Assets.Asset"
1 change: 0 additions & 1 deletion thehive-cortex/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ libraryDependencies ++= Seq(
Library.zip4j
)

enablePlugins(PlayScala)
2 changes: 0 additions & 2 deletions thehive-metrics/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ libraryDependencies ++= Seq(
"io.dropwizard.metrics" % "metrics-ganglia" % "3.1.2",
"info.ganglia.gmetric4j" % "gmetric4j" % "1.0.10"
)

enablePlugins(PlayScala)
4 changes: 1 addition & 3 deletions thehive-misp/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ libraryDependencies ++= Seq(
Library.Play.ahc,
Library.zip4j,
Library.elastic4play
)

enablePlugins(PlayScala)
)

0 comments on commit c363609

Please sign in to comment.