From 7b8068f3c60d262c72ececa5b7d45e7ef86cb0e1 Mon Sep 17 00:00:00 2001 From: Alexey ERYSHEV Date: Wed, 23 Jan 2019 12:58:11 +0100 Subject: [PATCH] remove doobie debug logs reducing amoung of logs producing by Cuttle as some logs aren't configurable currently - removing doobie debug logs - removing duplicated debug logs from execution streams --- build.sbt | 2 +- core/src/main/scala/com/criteo/cuttle/Database.scala | 2 -- core/src/main/scala/com/criteo/cuttle/Executor.scala | 4 +--- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index c6b819cb0..ff2a41f4e 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ val devMode = settingKey[Boolean]("Some build optimization are applied in devMode.") val writeClasspath = taskKey[File]("Write the project classpath to a file.") -val VERSION = "0.5.2" +val VERSION = "0.5.3" lazy val catsCore = "1.5.0" lazy val circe = "0.10.1" diff --git a/core/src/main/scala/com/criteo/cuttle/Database.scala b/core/src/main/scala/com/criteo/cuttle/Database.scala index a829076d3..d23d5fc7e 100644 --- a/core/src/main/scala/com/criteo/cuttle/Database.scala +++ b/core/src/main/scala/com/criteo/cuttle/Database.scala @@ -14,7 +14,6 @@ import io.circe.parser._ import cats.data.NonEmptyList import cats.implicits._ import cats.effect.{IO, Resource} -import doobie.util.log import com.criteo.cuttle.ExecutionStatus._ import com.criteo.cuttle.events.{Event, JobSuccessForced} @@ -66,7 +65,6 @@ object DatabaseConfig { } private[cuttle] object Database { - implicit val logHandler: log.LogHandler = DoobieLogsHandler(logger).handler implicit val ExecutionStatusMeta: Meta[ExecutionStatus] = Meta[Boolean].imap(x => if (x) ExecutionSuccessful else ExecutionFailed: ExecutionStatus) { diff --git a/core/src/main/scala/com/criteo/cuttle/Executor.scala b/core/src/main/scala/com/criteo/cuttle/Executor.scala index 86942b21e..21f702e60 100755 --- a/core/src/main/scala/com/criteo/cuttle/Executor.scala +++ b/core/src/main/scala/com/criteo/cuttle/Executor.scala @@ -779,10 +779,8 @@ class Executor[S <: Scheduling] private[cuttle] (val platforms: Seq[ExecutionPla val nextExecutionId = utils.randomUUID val streams = new ExecutionStreams { - def writeln(str: CharSequence) = { + def writeln(str: CharSequence) = ExecutionStreams.writeln(nextExecutionId, str) - logger.debug(s"[$nextExecutionId] $str") - } } // wrap the execution context so that we can register the name of the thread of each