aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/core/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/xyz/driver/core/app')
-rw-r--r--src/main/scala/xyz/driver/core/app/DriverApp.scala3
-rw-r--r--src/main/scala/xyz/driver/core/app/init.scala9
2 files changed, 7 insertions, 5 deletions
diff --git a/src/main/scala/xyz/driver/core/app/DriverApp.scala b/src/main/scala/xyz/driver/core/app/DriverApp.scala
index 50e471c..03da72b 100644
--- a/src/main/scala/xyz/driver/core/app/DriverApp.scala
+++ b/src/main/scala/xyz/driver/core/app/DriverApp.scala
@@ -91,8 +91,7 @@ class DriverApp(
def route: Route = versionRt ~ healthRoute
}
val combinedRoute =
- Route.seal(
- modules.map(_.route).foldLeft(basicRoutes.routeWithDefaults)(_ ~ _) ~ swaggerRoute.route ~ defaultOptionsRoute)
+ Route.seal(modules.map(_.route).foldLeft(basicRoutes.routeWithDefaults)(_ ~ _) ~ swaggerRoute.route)
(extractHost & extractClientIP & trace(tracer) & handleRejections(authenticationRejectionHandler)) {
case (origin, ip) =>
ctx =>
diff --git a/src/main/scala/xyz/driver/core/app/init.scala b/src/main/scala/xyz/driver/core/app/init.scala
index 767fd0b..bb7a798 100644
--- a/src/main/scala/xyz/driver/core/app/init.scala
+++ b/src/main/scala/xyz/driver/core/app/init.scala
@@ -10,7 +10,7 @@ import com.typesafe.config.{Config, ConfigFactory}
import com.typesafe.scalalogging.Logger
import org.slf4j.LoggerFactory
import xyz.driver.core.logging.MdcExecutionContext
-import xyz.driver.core.reporting.{NoTraceReporter, ScalaLoggerLike}
+import xyz.driver.core.reporting.{ScalaLoggingCompat, NoTraceReporter}
import xyz.driver.core.time.provider.TimeProvider
import xyz.driver.tracing.{GoogleTracer, NoTracer, Tracer}
@@ -26,7 +26,7 @@ object init {
val gitHeadCommit: scala.Option[String]
}
- case class ApplicationContext(config: Config, clock: Clock, reporter: ScalaLoggerLike) {
+ case class ApplicationContext(config: Config, clock: Clock, reporter: ScalaLoggingCompat) {
val time: TimeProvider = clock
}
@@ -90,7 +90,10 @@ object init {
ApplicationContext(
config = getEnvironmentSpecificConfig(),
clock = Clock.systemUTC(),
- new NoTraceReporter(Logger(LoggerFactory.getLogger(classOf[DriverApp]))))
+ new NoTraceReporter with ScalaLoggingCompat {
+ val logger = Logger(LoggerFactory.getLogger(classOf[DriverApp]))
+ }
+ )
def createDefaultApplication(
modules: Seq[Module],