From 87e32c3d51f3db61b56ff73c8e619ac72c912b36 Mon Sep 17 00:00:00 2001 From: "victor.mueller@digitalasset.com" Date: Wed, 19 May 2021 10:20:03 +0200 Subject: [PATCH] Add cli option & system property to enable json only logging for http json service changelog_begin - [Ledger HTTP Json Service] Logging output can now be in JSON either via providing the cli option `--log-encoder json` or via setting the env var `LOG_FORMAT_JSON=true` changelog_end --- bazel-java-deps.bzl | 3 +- daml-script/test/BUILD.bazel | 1 + .../lf/engine/script/test/JsonApiIt.scala | 2 + .../test/src/main/resources/logback-test.xml | 2 +- ledger-service/cli-opts/BUILD.bazel | 8 ++ .../src/main/scala/cliopts/Logging.scala | 65 +++++++++++++++- ledger-service/http-json-cli/BUILD.bazel | 1 + .../main/scala/com/daml/http/CliBase.scala | 3 +- .../src/main/scala/com/daml/http/Config.scala | 2 + .../scala/com/daml/http/OptionParser.scala | 4 +- .../scala/com/daml/http/StartSettings.scala | 2 + ledger-service/http-json-testing/BUILD.bazel | 1 + ledger-service/http-json/BUILD.bazel | 2 +- .../src/failure/resources/logback.xml | 2 +- .../http-json/src/it/resources/logback.xml | 2 +- .../http-json/src/main/resources/logback.xml | 20 +++-- .../scala/com/digitalasset/http/Main.scala | 21 +++++- .../src/main/resources/logback.xml | 2 +- .../src/test/resources/logback-test.xml | 2 +- .../src/test/resources/logback-test.xml | 2 +- .../src/test/resources/logback-test.xml | 2 +- .../state/kvutils/app/logback.base.xml | 2 +- .../src/test/resources/logback-test.xml | 2 +- .../src/main/resources/logback.xml | 2 +- .../src/test/resources/logback-test.xml | 2 +- .../src/main/resources/logback.xml | 2 +- .../platform/sandbox/cli/CommonCliBase.scala | 2 +- .../platform/sandbox/logback-test.base.xml | 4 +- .../src/test/resources/logback-test.xml | 2 +- libs-scala/contextualized-logging/BUILD.bazel | 1 + .../digitalasset/logging/LeveledLogger.scala | 15 +++- .../src/test/suite/resources/logback.xml | 16 ++++ .../logging/ContextualizedLoggerSpec.scala | 28 +++---- maven_install_2.12.json | 74 ++++++++++++++++--- maven_install_2.13.json | 74 ++++++++++++++++--- .../runner/src/main/resources/logback.xml | 2 +- .../service/src/test/resources/logback.xml | 2 +- 37 files changed, 308 insertions(+), 71 deletions(-) create mode 100644 libs-scala/contextualized-logging/src/test/suite/resources/logback.xml diff --git a/bazel-java-deps.bzl b/bazel-java-deps.bzl index 14f4693c5fd7..27b03bcfaa20 100644 --- a/bazel-java-deps.bzl +++ b/bazel-java-deps.bzl @@ -135,7 +135,8 @@ def install_java_deps(): "javax.ws.rs:javax.ws.rs-api:2.1", "junit:junit:4.12", "junit:junit-dep:4.10", - "net.logstash.logback:logstash-logback-encoder:6.3", + "net.logstash.logback:logstash-logback-encoder:6.6", + "org.codehaus.janino:janino:3.1.4", "org.apache.commons:commons-lang3:3.9", "org.apache.commons:commons-text:1.4", "org.awaitility:awaitility:3.1.6", diff --git a/daml-script/test/BUILD.bazel b/daml-script/test/BUILD.bazel index ff4a2843780a..8780b0754b1d 100644 --- a/daml-script/test/BUILD.bazel +++ b/daml-script/test/BUILD.bazel @@ -184,6 +184,7 @@ da_scala_test_suite( "//language-support/scala/bindings-akka", "//ledger-api/rs-grpc-bridge", "//ledger-api/testing-utils", + "//ledger-service/cli-opts", "//ledger-service/http-json:http-json-ce", "//ledger-service/http-json-cli:ce", "//ledger-service/jwt", diff --git a/daml-script/test/src/com/digitalasset/daml/lf/engine/script/test/JsonApiIt.scala b/daml-script/test/src/com/digitalasset/daml/lf/engine/script/test/JsonApiIt.scala index 9c2ee4dcf582..3f0d01691748 100644 --- a/daml-script/test/src/com/digitalasset/daml/lf/engine/script/test/JsonApiIt.scala +++ b/daml-script/test/src/com/digitalasset/daml/lf/engine/script/test/JsonApiIt.scala @@ -12,6 +12,7 @@ import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Directives._ import akka.stream.Materializer import com.daml.bazeltools.BazelRunfiles._ +import com.daml.cliopts.Logging.LogEncoder import com.daml.grpc.adapter.{AkkaExecutionSequencerPool, ExecutionSequencerFactory} import com.daml.http.util.Logging.{InstanceUUID, instanceUUIDLogCtx} import com.daml.http.{HttpService, StartSettings, nonrepudiation} @@ -157,6 +158,7 @@ trait JsonApiFixture override val allowNonHttps = true override val nonRepudiation = nonrepudiation.Configuration.Cli.Empty override val logLevel = None + override val logEncoder = LogEncoder.Plain } HttpService .start(config)( diff --git a/daml-script/test/src/main/resources/logback-test.xml b/daml-script/test/src/main/resources/logback-test.xml index b1455e404a2d..2adb6a84e2c8 100644 --- a/daml-script/test/src/main/resources/logback-test.xml +++ b/daml-script/test/src/main/resources/logback-test.xml @@ -2,7 +2,7 @@ - %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger-service/cli-opts/BUILD.bazel b/ledger-service/cli-opts/BUILD.bazel index 2570df05ba37..1043a1fe74db 100644 --- a/ledger-service/cli-opts/BUILD.bazel +++ b/ledger-service/cli-opts/BUILD.bazel @@ -16,7 +16,15 @@ da_scala_library( ], scalacopts = lf_scalacopts, tags = ["maven_coordinates=com.daml:http-json-cli-opts:__VERSION__"], + versioned_scala_deps = { + "2.12": [ + "@maven//:org_scala_lang_modules_scala_collection_compat", + ], + }, visibility = ["//visibility:public"], + runtime_deps = [ + "@maven//:org_codehaus_janino_janino", + ], deps = [ "//ledger/ledger-api-common", "@maven//:ch_qos_logback_logback_classic", diff --git a/ledger-service/cli-opts/src/main/scala/cliopts/Logging.scala b/ledger-service/cli-opts/src/main/scala/cliopts/Logging.scala index 1cce3572ee6e..e46616bca8bf 100644 --- a/ledger-service/cli-opts/src/main/scala/cliopts/Logging.scala +++ b/ledger-service/cli-opts/src/main/scala/cliopts/Logging.scala @@ -7,8 +7,41 @@ import ch.qos.logback.classic.{Level => LogLevel} object Logging { + def reconfigure(clazz: Class[_], pathToLogbackFileInJarFile: String): Unit = { + // Try reconfiguring the library + import ch.qos.logback.core.joran.spi.JoranException + import ch.qos.logback.classic.LoggerContext + import ch.qos.logback.classic.joran.JoranConfigurator + import org.slf4j.LoggerFactory + import scala.util.Using + Using.resource(clazz.getClassLoader.getResource(pathToLogbackFileInJarFile).openStream()) { + stream => + try { + val context = LoggerFactory.getILoggerFactory.asInstanceOf[LoggerContext] + val configurator = new JoranConfigurator + configurator.setContext(context) + context.reset() + configurator.doConfigure(stream) + } catch { + case je: JoranException => + // Fallback to System.err.println because the logger won't work in any way anymore. + System.err.println(s"reconfigured failed using url $pathToLogbackFileInJarFile: $je") + je.printStackTrace(System.err) + } finally { + stream.close() + } + } + } + private val KnownLogLevels = Set("ERROR", "WARN", "INFO", "DEBUG", "TRACE") + sealed trait LogEncoder + + object LogEncoder { + case object Plain extends LogEncoder + case object Json extends LogEncoder + } + private implicit val scoptLogLevel: scopt.Read[LogLevel] = scopt.Read.reads { level => Either .cond( @@ -19,9 +52,19 @@ object Logging { .getOrElse(throw new java.lang.IllegalArgumentException(s"Unknown logging level $level")) } + private implicit val scoptLogEncoder: scopt.Read[LogEncoder] = + scopt.Read.reads { encoder => + encoder.toLowerCase match { + case "plain" => LogEncoder.Plain + case "json" => LogEncoder.Json + case _ => + throw new java.lang.IllegalArgumentException(s"Unrecognized logging encoder $encoder") + } + } + /** Parse in the cli option for the logging level. */ - def loggingLevelParse[C]( + def logLevelParse[C]( parser: scopt.OptionParser[C] )(logLevel: Setter[C, Option[LogLevel]]): Unit = { import parser.opt @@ -34,4 +77,24 @@ object Logging { ) () } + + def logEncoderParse[C]( + parser: scopt.OptionParser[C] + )(logEncoder: Setter[C, LogEncoder]): Unit = { + import parser.opt + + opt[LogEncoder]("log-encoder") + .optional() + .action { + case (LogEncoder.Plain, c) => c + case (encoder, c) => logEncoder(_ => encoder, c) + } + .text("Which encoder to use: plain|json") + () + } + + def setUseJsonLogEncoderSystemProp(): Unit = { + System.setProperty("LOG_FORMAT_JSON", "true") + () + } } diff --git a/ledger-service/http-json-cli/BUILD.bazel b/ledger-service/http-json-cli/BUILD.bazel index 82f9a2419065..326d9bf3e3b7 100644 --- a/ledger-service/http-json-cli/BUILD.bazel +++ b/ledger-service/http-json-cli/BUILD.bazel @@ -38,6 +38,7 @@ da_scala_library( exports = [":base"], deps = [ ":base", + "//ledger-service/cli-opts", "//ledger/ledger-api-common", ], ) diff --git a/ledger-service/http-json-cli/src/main/scala/com/daml/http/CliBase.scala b/ledger-service/http-json-cli/src/main/scala/com/daml/http/CliBase.scala index ef4aacbdde9f..ce47d2362434 100644 --- a/ledger-service/http-json-cli/src/main/scala/com/daml/http/CliBase.scala +++ b/ledger-service/http-json-cli/src/main/scala/com/daml/http/CliBase.scala @@ -3,9 +3,8 @@ package com.daml.http -import com.typesafe.scalalogging.StrictLogging +trait CliBase { -trait CliBase extends StrictLogging { private[http] def parseConfig( args: collection.Seq[String], supportedJdbcDriverNames: Set[String], diff --git a/ledger-service/http-json-cli/src/main/scala/com/daml/http/Config.scala b/ledger-service/http-json-cli/src/main/scala/com/daml/http/Config.scala index dcd8ddd4c67a..691464363fd7 100644 --- a/ledger-service/http-json-cli/src/main/scala/com/daml/http/Config.scala +++ b/ledger-service/http-json-cli/src/main/scala/com/daml/http/Config.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration._ import scala.util.Try import ch.qos.logback.classic.{Level => LogLevel} +import com.daml.cliopts.Logging.LogEncoder // The internal transient scopt structure *and* StartSettings; external `start` // users should extend StartSettings or DefaultStartSettings themselves @@ -39,6 +40,7 @@ private[http] final case class Config( wsConfig: Option[WebsocketConfig] = None, nonRepudiation: nonrepudiation.Configuration.Cli = nonrepudiation.Configuration.Cli.Empty, logLevel: Option[LogLevel] = None, // the default is in logback.xml + logEncoder: LogEncoder = LogEncoder.Plain, ) extends StartSettings private[http] object Config { diff --git a/ledger-service/http-json-cli/src/main/scala/com/daml/http/OptionParser.scala b/ledger-service/http-json-cli/src/main/scala/com/daml/http/OptionParser.scala index bb292df17d2b..248156d1def6 100644 --- a/ledger-service/http-json-cli/src/main/scala/com/daml/http/OptionParser.scala +++ b/ledger-service/http-json-cli/src/main/scala/com/daml/http/OptionParser.scala @@ -166,5 +166,7 @@ class OptionParser(getEnvVar: String => Option[String], supportedJdbcDriverNames .valueName(WebsocketConfig.usage) .text(s"Optional websocket configuration string. ${WebsocketConfig.help}") - cliopts.Logging.loggingLevelParse(this)((f, c) => c.copy(logLevel = f(c.logLevel))) + cliopts.Logging.logLevelParse(this)((f, c) => c.copy(logLevel = f(c.logLevel))) + cliopts.Logging.logEncoderParse(this)((f, c) => c.copy(logEncoder = f(c.logEncoder))) + } diff --git a/ledger-service/http-json-cli/src/main/scala/com/daml/http/StartSettings.scala b/ledger-service/http-json-cli/src/main/scala/com/daml/http/StartSettings.scala index 02bf6e06b552..397f003dd6f9 100644 --- a/ledger-service/http-json-cli/src/main/scala/com/daml/http/StartSettings.scala +++ b/ledger-service/http-json-cli/src/main/scala/com/daml/http/StartSettings.scala @@ -10,6 +10,7 @@ import com.daml.ledger.api.tls.TlsConfiguration import scala.concurrent.duration.FiniteDuration import ch.qos.logback.classic.{Level => LogLevel} +import com.daml.cliopts.Logging.LogEncoder // defined separately from Config so // 1. it is absolutely lexically apparent what `import startSettings._` means @@ -31,6 +32,7 @@ trait StartSettings { val healthTimeoutSeconds: Int val nonRepudiation: nonrepudiation.Configuration.Cli val logLevel: Option[LogLevel] + val logEncoder: LogEncoder } object StartSettings { diff --git a/ledger-service/http-json-testing/BUILD.bazel b/ledger-service/http-json-testing/BUILD.bazel index f2e34fe3eb15..3b6146bdc84c 100644 --- a/ledger-service/http-json-testing/BUILD.bazel +++ b/ledger-service/http-json-testing/BUILD.bazel @@ -49,6 +49,7 @@ hj_scalacopts = lf_scalacopts + [ "//ledger-api/rs-grpc-bridge", "//ledger-service/http-json:http-json-{}".format(edition), "//ledger-service/http-json-cli:{}".format(edition), + "//ledger-service/cli-opts", "//ledger-service/jwt", "//ledger-service/utils", "//ledger/caching", diff --git a/ledger-service/http-json/BUILD.bazel b/ledger-service/http-json/BUILD.bazel index e7aa6649ed27..fa92d9fdf0bf 100644 --- a/ledger-service/http-json/BUILD.bazel +++ b/ledger-service/http-json/BUILD.bazel @@ -47,6 +47,7 @@ hj_scalacopts = lf_scalacopts + [ visibility = ["//visibility:public"], runtime_deps = [ "@maven//:ch_qos_logback_logback_classic", + "@maven//:org_codehaus_janino_janino", ], deps = [ "//runtime-components/jdbc-drivers:jdbc-drivers-{}".format(edition), @@ -183,7 +184,6 @@ daml_compile( "@maven//:com_chuusai_shapeless", "@maven//:com_lihaoyi_sourcecode", "@maven//:com_typesafe_akka_akka_http_core", - "@maven//:com_typesafe_scala_logging_scala_logging", "@maven//:io_spray_spray_json", "@maven//:org_scala_lang_modules_scala_collection_compat", "@maven//:org_scalacheck_scalacheck", diff --git a/ledger-service/http-json/src/failure/resources/logback.xml b/ledger-service/http-json/src/failure/resources/logback.xml index dedbc5f65e5d..a3bfcd7686b9 100644 --- a/ledger-service/http-json/src/failure/resources/logback.xml +++ b/ledger-service/http-json/src/failure/resources/logback.xml @@ -3,7 +3,7 @@ - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger-service/http-json/src/it/resources/logback.xml b/ledger-service/http-json/src/it/resources/logback.xml index dedbc5f65e5d..a3bfcd7686b9 100644 --- a/ledger-service/http-json/src/it/resources/logback.xml +++ b/ledger-service/http-json/src/it/resources/logback.xml @@ -3,7 +3,7 @@ - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger-service/http-json/src/main/resources/logback.xml b/ledger-service/http-json/src/main/resources/logback.xml index f61cc99b7708..7066404a2190 100644 --- a/ledger-service/http-json/src/main/resources/logback.xml +++ b/ledger-service/http-json/src/main/resources/logback.xml @@ -1,10 +1,18 @@ + - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - + + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n + + + @@ -14,4 +22,4 @@ - \ No newline at end of file + diff --git a/ledger-service/http-json/src/main/scala/com/digitalasset/http/Main.scala b/ledger-service/http-json/src/main/scala/com/digitalasset/http/Main.scala index 3efc0e9840f5..b6f78bb2f87c 100644 --- a/ledger-service/http-json/src/main/scala/com/digitalasset/http/Main.scala +++ b/ledger-service/http-json/src/main/scala/com/digitalasset/http/Main.scala @@ -7,6 +7,7 @@ import java.nio.file.Path import akka.actor.ActorSystem import akka.http.scaladsl.Http.ServerBinding import akka.stream.Materializer +import com.daml.cliopts.Logging.LogEncoder import com.daml.grpc.adapter.{AkkaExecutionSequencerPool, ExecutionSequencerFactory} import com.daml.runtime.JdbcDrivers import com.daml.scalautil.Statement.discard @@ -15,7 +16,7 @@ import scalaz.{-\/, \/, \/-} import scalaz.std.anyVal._ import scalaz.std.option._ import scalaz.syntax.show._ -import com.daml.cliopts.GlobalLogLevel +import com.daml.cliopts.{GlobalLogLevel, Logging} import com.daml.http.util.Logging.{InstanceUUID, instanceUUIDLogCtx} import com.daml.logging.{ContextualizedLogger, LoggingContextOf} @@ -33,6 +34,22 @@ object Main { val StartupError = 101 } + def adjustAndReloadLoggingOptions( + config: Config + ): Unit = { + // If the system property was explicitly set before application startup and the config option was provided, + // the prior value will be overridden here. + config.logEncoder match { + case LogEncoder.Plain => () // This is the default + case LogEncoder.Json => + Logging.setUseJsonLogEncoderSystemProp() + Logging.reconfigure(getClass, "logback.xml") + } + // Here we set all things which are related to logging but not to + // any env vars in the logback.xml file. + config.logLevel.foreach(GlobalLogLevel.set("Ledger HTTP-JSON API")) + } + def main(args: Array[String]): Unit = { instanceUUIDLogCtx(implicit lc => Cli.parseConfig( @@ -40,6 +57,7 @@ object Main { ContractDao.supportedJdbcDriverNames(JdbcDrivers.availableJdbcDriverNames), ) match { case Some(config) => + adjustAndReloadLoggingOptions(config) main(config) case None => // error is printed out by scopt @@ -49,7 +67,6 @@ object Main { } private def main(config: Config)(implicit lc: LoggingContextOf[InstanceUUID]): Unit = { - config.logLevel.foreach(GlobalLogLevel.set("Ledger HTTP-JSON API")) logger.info( s"Config(ledgerHost=${config.ledgerHost: String}, ledgerPort=${config.ledgerPort: Int}" + s", address=${config.address: String}, httpPort=${config.httpPort: Int}" + diff --git a/ledger/indexer-benchmark/src/main/resources/logback.xml b/ledger/indexer-benchmark/src/main/resources/logback.xml index 23cc99c32f4b..9c9631999592 100644 --- a/ledger/indexer-benchmark/src/main/resources/logback.xml +++ b/ledger/indexer-benchmark/src/main/resources/logback.xml @@ -7,7 +7,7 @@ - %d{HH:mm:ss.SSS} %-5level %logger{5} - %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger/ledger-on-memory/src/test/resources/logback-test.xml b/ledger/ledger-on-memory/src/test/resources/logback-test.xml index 49b981fbd492..d65bd0cd9f14 100644 --- a/ledger/ledger-on-memory/src/test/resources/logback-test.xml +++ b/ledger/ledger-on-memory/src/test/resources/logback-test.xml @@ -2,7 +2,7 @@ - %level %logger{10}: %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger/ledger-on-sql/src/test/resources/logback-test.xml b/ledger/ledger-on-sql/src/test/resources/logback-test.xml index 67fe2c4e2788..c4307f2d5d16 100644 --- a/ledger/ledger-on-sql/src/test/resources/logback-test.xml +++ b/ledger/ledger-on-sql/src/test/resources/logback-test.xml @@ -2,7 +2,7 @@ - %level %logger{10}: %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger/participant-integration-api/src/test/resources/logback-test.xml b/ledger/participant-integration-api/src/test/resources/logback-test.xml index 6f0415f30433..c58e73fdb042 100644 --- a/ledger/participant-integration-api/src/test/resources/logback-test.xml +++ b/ledger/participant-integration-api/src/test/resources/logback-test.xml @@ -2,7 +2,7 @@ - %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger/participant-state/kvutils/app/src/main/resources/com/daml/ledger/participant/state/kvutils/app/logback.base.xml b/ledger/participant-state/kvutils/app/src/main/resources/com/daml/ledger/participant/state/kvutils/app/logback.base.xml index b5a6e9178a30..73023cdbcaa9 100644 --- a/ledger/participant-state/kvutils/app/src/main/resources/com/daml/ledger/participant/state/kvutils/app/logback.base.xml +++ b/ledger/participant-state/kvutils/app/src/main/resources/com/daml/ledger/participant/state/kvutils/app/logback.base.xml @@ -7,7 +7,7 @@ - %d{HH:mm:ss.SSS} %-5level %logger{5} - %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger/participant-state/kvutils/src/test/resources/logback-test.xml b/ledger/participant-state/kvutils/src/test/resources/logback-test.xml index 6db2204661cf..bb22d1b5ee98 100644 --- a/ledger/participant-state/kvutils/src/test/resources/logback-test.xml +++ b/ledger/participant-state/kvutils/src/test/resources/logback-test.xml @@ -2,7 +2,7 @@ - %level %logger{10}: %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger/participant-state/kvutils/tools/integrity-check/src/main/resources/logback.xml b/ledger/participant-state/kvutils/tools/integrity-check/src/main/resources/logback.xml index 23cc99c32f4b..9c9631999592 100644 --- a/ledger/participant-state/kvutils/tools/integrity-check/src/main/resources/logback.xml +++ b/ledger/participant-state/kvutils/tools/integrity-check/src/main/resources/logback.xml @@ -7,7 +7,7 @@ - %d{HH:mm:ss.SSS} %-5level %logger{5} - %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger/recovering-indexer-integration-tests/src/test/resources/logback-test.xml b/ledger/recovering-indexer-integration-tests/src/test/resources/logback-test.xml index cc48efdd33b3..a96a0b17bf81 100644 --- a/ledger/recovering-indexer-integration-tests/src/test/resources/logback-test.xml +++ b/ledger/recovering-indexer-integration-tests/src/test/resources/logback-test.xml @@ -3,7 +3,7 @@ - %d{HH:mm:ss.SSS} %level %logger{10}: %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger/sandbox-common/src/main/resources/logback.xml b/ledger/sandbox-common/src/main/resources/logback.xml index b594f72365ca..0b73aaa6b34e 100644 --- a/ledger/sandbox-common/src/main/resources/logback.xml +++ b/ledger/sandbox-common/src/main/resources/logback.xml @@ -2,7 +2,7 @@ - %level: %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger/sandbox-common/src/main/scala/platform/sandbox/cli/CommonCliBase.scala b/ledger/sandbox-common/src/main/scala/platform/sandbox/cli/CommonCliBase.scala index e21f38d572e7..ef5aa4fd3980 100644 --- a/ledger/sandbox-common/src/main/scala/platform/sandbox/cli/CommonCliBase.scala +++ b/ledger/sandbox-common/src/main/scala/platform/sandbox/cli/CommonCliBase.scala @@ -194,7 +194,7 @@ class CommonCliBase(name: LedgerName) { .text("This flag is deprecated -- please use --sql-backend-jdbcurl.") .action((url, config) => config.copy(jdbcUrl = Some(url))) - com.daml.cliopts.Logging.loggingLevelParse(this)((f, c) => c.copy(logLevel = f(c.logLevel))) + com.daml.cliopts.Logging.logLevelParse(this)((f, c) => c.copy(logLevel = f(c.logLevel))) opt[Unit]("eager-package-loading") .optional() diff --git a/ledger/sandbox-common/src/test/resources/com/daml/platform/sandbox/logback-test.base.xml b/ledger/sandbox-common/src/test/resources/com/daml/platform/sandbox/logback-test.base.xml index 2f5718b51134..52300ed1784b 100644 --- a/ledger/sandbox-common/src/test/resources/com/daml/platform/sandbox/logback-test.base.xml +++ b/ledger/sandbox-common/src/test/resources/com/daml/platform/sandbox/logback-test.base.xml @@ -5,9 +5,7 @@ - %date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC} %-5level %logger{5}@[%-4.30thread] - - %msg%n - + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/ledger/sandbox-on-x/src/test/resources/logback-test.xml b/ledger/sandbox-on-x/src/test/resources/logback-test.xml index 49b981fbd492..d65bd0cd9f14 100644 --- a/ledger/sandbox-on-x/src/test/resources/logback-test.xml +++ b/ledger/sandbox-on-x/src/test/resources/logback-test.xml @@ -2,7 +2,7 @@ - %level %logger{10}: %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/libs-scala/contextualized-logging/BUILD.bazel b/libs-scala/contextualized-logging/BUILD.bazel index ffb2d9063fce..ad22d08a9249 100644 --- a/libs-scala/contextualized-logging/BUILD.bazel +++ b/libs-scala/contextualized-logging/BUILD.bazel @@ -35,6 +35,7 @@ da_scala_library( da_scala_test_suite( name = "contextualized-logging-tests", srcs = glob(["src/test/suite/**/*.scala"]), + resources = glob(["src/test/suite/resources/**/*"]), scala_deps = [ "@maven//:com_typesafe_akka_akka_actor", "@maven//:com_typesafe_akka_akka_stream", diff --git a/libs-scala/contextualized-logging/src/main/scala/com/digitalasset/logging/LeveledLogger.scala b/libs-scala/contextualized-logging/src/main/scala/com/digitalasset/logging/LeveledLogger.scala index 7821cbb047aa..8580eb726f60 100644 --- a/libs-scala/contextualized-logging/src/main/scala/com/digitalasset/logging/LeveledLogger.scala +++ b/libs-scala/contextualized-logging/src/main/scala/com/digitalasset/logging/LeveledLogger.scala @@ -18,6 +18,8 @@ private[logging] object LeveledLogger { logger.trace(m, msg, t) override protected def log(fmt: String, arg: AnyRef): Unit = logger.trace(fmt, arg) + override protected def log(m: Marker, msg: String): Unit = + logger.trace(m, msg) } final class Debug(logger: Logger) extends LeveledLogger { @@ -31,6 +33,8 @@ private[logging] object LeveledLogger { logger.debug(m, msg, t) override protected def log(fmt: String, arg: AnyRef): Unit = logger.debug(fmt, arg) + override protected def log(m: Marker, msg: String): Unit = + logger.debug(m, msg) } final class Info(logger: Logger) extends LeveledLogger { @@ -44,6 +48,8 @@ private[logging] object LeveledLogger { logger.info(m, msg, t) override protected def log(fmt: String, arg: AnyRef): Unit = logger.info(fmt, arg) + override protected def log(m: Marker, msg: String): Unit = + logger.info(m, msg) } final class Warn(logger: Logger) extends LeveledLogger { @@ -57,6 +63,8 @@ private[logging] object LeveledLogger { logger.warn(m, msg, t) override protected def log(fmt: String, arg: AnyRef): Unit = logger.warn(fmt, arg) + override protected def log(m: Marker, msg: String): Unit = + logger.warn(m, msg) } final class Error(logger: Logger) extends LeveledLogger { @@ -70,6 +78,8 @@ private[logging] object LeveledLogger { logger.error(m, msg, t) override protected def log(fmt: String, arg: AnyRef): Unit = logger.error(fmt, arg) + override protected def log(m: Marker, msg: String): Unit = + logger.error(m, msg) } } @@ -82,13 +92,14 @@ private[logging] sealed abstract class LeveledLogger { protected def log(msg: String, t: Throwable): Unit protected def log(m: Marker, msg: String, t: Throwable): Unit protected def log(fmt: String, arg: AnyRef): Unit + protected def log(m: Marker, msg: String): Unit final def apply(msg: => String)(implicit loggingContext: LoggingContext): Unit = if (isEnabled) - loggingContext.ifEmpty(log(msg))(log(s"$msg (context: {})", _)) + loggingContext.ifEmpty(log(msg))(log(_, msg)) final def apply(msg: => String, t: Throwable)(implicit loggingContext: LoggingContext): Unit = if (isEnabled) - loggingContext.ifEmpty(log(msg, t))(c => log(c, s"$msg (context: $c)", t)) + loggingContext.ifEmpty(log(msg, t))(c => log(c, msg, t)) } diff --git a/libs-scala/contextualized-logging/src/test/suite/resources/logback.xml b/libs-scala/contextualized-logging/src/test/suite/resources/logback.xml new file mode 100644 index 000000000000..13d4f8ba9685 --- /dev/null +++ b/libs-scala/contextualized-logging/src/test/suite/resources/logback.xml @@ -0,0 +1,16 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n + + + + + + + + + + + diff --git a/libs-scala/contextualized-logging/src/test/suite/scala/com/digitalasset/logging/ContextualizedLoggerSpec.scala b/libs-scala/contextualized-logging/src/test/suite/scala/com/digitalasset/logging/ContextualizedLoggerSpec.scala index 5af6aed8438b..a8754e29b0a9 100644 --- a/libs-scala/contextualized-logging/src/test/suite/scala/com/digitalasset/logging/ContextualizedLoggerSpec.scala +++ b/libs-scala/contextualized-logging/src/test/suite/scala/com/digitalasset/logging/ContextualizedLoggerSpec.scala @@ -34,7 +34,7 @@ final class ContextualizedLoggerSpec withContext("id" -> "foobar")() { logger => implicit loggingContext => logger.info("a") val m = logger.withoutContext - verify(m).info(eqTo("a (context: {})"), toStringEqTo[AnyRef]("{id=foobar}")) + verify(m).info(toStringEqTo[Marker]("{id=foobar}"), eqTo("a")) } it should "pass the context via the markers if a throwable is provided" in @@ -42,7 +42,7 @@ final class ContextualizedLoggerSpec logger.error("a", new IllegalArgumentException("quux")) verify(logger.withoutContext).error( toStringEqTo[Marker]("{id=foo}"), - eqTo("a (context: {id=foo})"), + eqTo("a"), withMessage[IllegalArgumentException]("quux"), ) } @@ -63,9 +63,9 @@ final class ContextualizedLoggerSpec } logger.info("c") val m = logger.withoutContext - verify(m).info(eqTo("a (context: {})"), toStringEqTo[AnyRef]("{i1=x}")) - verify(m).info(eqTo("b (context: {})"), toStringEqTo[AnyRef]("{i1=x, i2=y}")) - verify(m).info(eqTo("c (context: {})"), toStringEqTo[AnyRef]("{i1=x}")) + verify(m).info(toStringEqTo[Marker]("{i1=x}"), eqTo("a")) + verify(m).info(toStringEqTo[Marker]("{i1=x, i2=y}"), eqTo("b")) + verify(m).info(toStringEqTo[Marker]("{i1=x}"), eqTo("c")) } it should "override with values provided in a more specific scope" in @@ -76,9 +76,9 @@ final class ContextualizedLoggerSpec } logger.info("c") val m = logger.withoutContext - verify(m).info(eqTo("a (context: {})"), toStringEqTo[AnyRef]("{id=foobar}")) - verify(m).info(eqTo("b (context: {})"), toStringEqTo[AnyRef]("{id=quux}")) - verify(m).info(eqTo("c (context: {})"), toStringEqTo[AnyRef]("{id=foobar}")) + verify(m).info(toStringEqTo[Marker]("{id=foobar}"), eqTo("a")) + verify(m).info(toStringEqTo[Marker]("{id=quux}"), eqTo("b")) + verify(m).info(toStringEqTo[Marker]("{id=foobar}"), eqTo("c")) } it should "pick the expected context also when executing in a future" in @@ -93,8 +93,8 @@ final class ContextualizedLoggerSpec Await.result(Future.sequence(Seq(f1, f2)), 10.seconds) } val m = logger.withoutContext - verify(m).info(eqTo("a (context: {})"), toStringEqTo[AnyRef]("{id=future}")) - verify(m).info(eqTo("b (context: {})"), toStringEqTo[AnyRef]("{id=next}")) + verify(m).info(toStringEqTo[Marker]("{id=future}"), eqTo("a")) + verify(m).info(toStringEqTo[Marker]("{id=next}"), eqTo("b")) } it should "drop the context if new context is provided at a more specific scope" in @@ -105,9 +105,9 @@ final class ContextualizedLoggerSpec } logger.info("d") val m = logger.withoutContext - verify(m).info(eqTo("a (context: {})"), toStringEqTo[AnyRef]("{id=foobar}")) + verify(m).info(toStringEqTo[Marker]("{id=foobar}"), eqTo("a")) verify(m).info("b") - verify(m).info(eqTo("d (context: {})"), toStringEqTo[AnyRef]("{id=foobar}")) + verify(m).info(toStringEqTo[Marker]("{id=foobar}"), eqTo("d")) } it should "allow the user to use the underlying logger, foregoing context" in @@ -122,7 +122,7 @@ final class ContextualizedLoggerSpec logger.info("b") val m = logger.withoutContext verify(m).info("a") - verify(m).info(eqTo("b (context: {})"), toStringEqTo[AnyRef]("{id=foobar}")) + verify(m).info(toStringEqTo[Marker]("{id=foobar}"), eqTo("b")) } it should "debug foreach stream item" in @@ -139,7 +139,7 @@ final class ContextualizedLoggerSpec items.foreach { item => verify(logger.withoutContext) - .debug(eqTo(s"$item (context: {})"), toStringEqTo[AnyRef]("{id=foobar}")) + .debug(toStringEqTo[Marker]("{id=foobar}"), eqTo(s"$item")) } } diff --git a/maven_install_2.12.json b/maven_install_2.12.json index 478353356a1b..678757f2cf3e 100644 --- a/maven_install_2.12.json +++ b/maven_install_2.12.json @@ -1,6 +1,6 @@ { "dependency_tree": { - "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": -332547172, + "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": 47651046, "conflict_resolution": {}, "dependencies": [ { @@ -5095,7 +5095,7 @@ "url": "https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.10.18/byte-buddy-1.10.18-sources.jar" }, { - "coord": "net.logstash.logback:logstash-logback-encoder:6.3", + "coord": "net.logstash.logback:logstash-logback-encoder:6.6", "dependencies": [ "com.fasterxml.jackson.core:jackson-databind:2.12.0", "com.fasterxml.jackson.core:jackson-annotations:2.12.0", @@ -5104,15 +5104,15 @@ "directDependencies": [ "com.fasterxml.jackson.core:jackson-databind:2.12.0" ], - "file": "v1/https/repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3.jar", + "file": "v1/https/repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6.jar", "mirror_urls": [ - "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3.jar" + "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6.jar" ], - "sha256": "715f129cfb319547dc8b79eb6185aea429cd31e3e7f6186fe6a33566be2ce87a", - "url": "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3.jar" + "sha256": "77117d422e17a843f52084cc575aa6cbe3582eae30e9aa57998e35cafcb75ebb", + "url": "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6.jar" }, { - "coord": "net.logstash.logback:logstash-logback-encoder:jar:sources:6.3", + "coord": "net.logstash.logback:logstash-logback-encoder:jar:sources:6.6", "dependencies": [ "com.fasterxml.jackson.core:jackson-databind:jar:sources:2.12.0", "com.fasterxml.jackson.core:jackson-annotations:jar:sources:2.12.0", @@ -5121,12 +5121,12 @@ "directDependencies": [ "com.fasterxml.jackson.core:jackson-databind:jar:sources:2.12.0" ], - "file": "v1/https/repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6-sources.jar", "mirror_urls": [ - "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3-sources.jar" + "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6-sources.jar" ], - "sha256": "fa50f4de9d3331c61331b22d1e3b9fc3b005f50905c871ceb247a6e84e835953", - "url": "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3-sources.jar" + "sha256": "c1b024235b9358d4548445b14e2d3abb2e24d0d5292de6f19524bfbb80b9cd93", + "url": "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6-sources.jar" }, { "coord": "net.sourceforge.htmlunit:htmlunit-core-js:2.39.0", @@ -5633,6 +5633,58 @@ "sha256": "764f65795e857c36c381e07b76f2e19217a472cef4c352bd40a090ca94305326", "url": "https://repo1.maven.org/maven2/org/checkerframework/checker/2.5.4/checker-2.5.4-sources.jar" }, + { + "coord": "org.codehaus.janino:commons-compiler:3.1.4", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4.jar" + ], + "sha256": "5171493e0a2c8ad5e5316a2da1fb48a14f03e154f472112e2bbd75d62e34bfd3", + "url": "https://repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4.jar" + }, + { + "coord": "org.codehaus.janino:commons-compiler:jar:sources:3.1.4", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4-sources.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4-sources.jar" + ], + "sha256": "9bb6c96054cb61cfa1f215c7893b098ef9b26ac12e218b5595d463cc24d55c8c", + "url": "https://repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4-sources.jar" + }, + { + "coord": "org.codehaus.janino:janino:3.1.4", + "dependencies": [ + "org.codehaus.janino:commons-compiler:3.1.4" + ], + "directDependencies": [ + "org.codehaus.janino:commons-compiler:3.1.4" + ], + "file": "v1/https/repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4.jar" + ], + "sha256": "234370ad8b26f76e4c6d92fa06340a36876a1157087ee0af26129ffd92103642", + "url": "https://repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4.jar" + }, + { + "coord": "org.codehaus.janino:janino:jar:sources:3.1.4", + "dependencies": [ + "org.codehaus.janino:commons-compiler:jar:sources:3.1.4" + ], + "directDependencies": [ + "org.codehaus.janino:commons-compiler:jar:sources:3.1.4" + ], + "file": "v1/https/repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4-sources.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4-sources.jar" + ], + "sha256": "f11953511f2c9a900cbb0af533f2156b72a644b54bc488dc24fab645d8f96b87", + "url": "https://repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4-sources.jar" + }, { "coord": "org.codehaus.mojo:animal-sniffer-annotations:1.19", "dependencies": [], diff --git a/maven_install_2.13.json b/maven_install_2.13.json index cd914f7392ae..68865661bb4e 100644 --- a/maven_install_2.13.json +++ b/maven_install_2.13.json @@ -1,6 +1,6 @@ { "dependency_tree": { - "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": 922690781, + "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": -880596761, "conflict_resolution": {}, "dependencies": [ { @@ -7321,7 +7321,7 @@ "url": "https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.3.1/jna-5.3.1-sources.jar" }, { - "coord": "net.logstash.logback:logstash-logback-encoder:6.3", + "coord": "net.logstash.logback:logstash-logback-encoder:6.6", "dependencies": [ "com.fasterxml.jackson.core:jackson-databind:2.12.0", "com.fasterxml.jackson.core:jackson-annotations:2.12.0", @@ -7330,15 +7330,15 @@ "directDependencies": [ "com.fasterxml.jackson.core:jackson-databind:2.12.0" ], - "file": "v1/https/repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3.jar", + "file": "v1/https/repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6.jar", "mirror_urls": [ - "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3.jar" + "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6.jar" ], - "sha256": "715f129cfb319547dc8b79eb6185aea429cd31e3e7f6186fe6a33566be2ce87a", - "url": "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3.jar" + "sha256": "77117d422e17a843f52084cc575aa6cbe3582eae30e9aa57998e35cafcb75ebb", + "url": "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6.jar" }, { - "coord": "net.logstash.logback:logstash-logback-encoder:jar:sources:6.3", + "coord": "net.logstash.logback:logstash-logback-encoder:jar:sources:6.6", "dependencies": [ "com.fasterxml.jackson.core:jackson-databind:jar:sources:2.12.0", "com.fasterxml.jackson.core:jackson-annotations:jar:sources:2.12.0", @@ -7347,12 +7347,12 @@ "directDependencies": [ "com.fasterxml.jackson.core:jackson-databind:jar:sources:2.12.0" ], - "file": "v1/https/repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6-sources.jar", "mirror_urls": [ - "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3-sources.jar" + "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6-sources.jar" ], - "sha256": "fa50f4de9d3331c61331b22d1e3b9fc3b005f50905c871ceb247a6e84e835953", - "url": "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3-sources.jar" + "sha256": "c1b024235b9358d4548445b14e2d3abb2e24d0d5292de6f19524bfbb80b9cd93", + "url": "https://repo1.maven.org/maven2/net/logstash/logback/logstash-logback-encoder/6.6/logstash-logback-encoder-6.6-sources.jar" }, { "coord": "net.sf.saxon:Saxon-HE:10.3", @@ -7955,6 +7955,58 @@ "sha256": "764f65795e857c36c381e07b76f2e19217a472cef4c352bd40a090ca94305326", "url": "https://repo1.maven.org/maven2/org/checkerframework/checker/2.5.4/checker-2.5.4-sources.jar" }, + { + "coord": "org.codehaus.janino:commons-compiler:3.1.4", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4.jar" + ], + "sha256": "5171493e0a2c8ad5e5316a2da1fb48a14f03e154f472112e2bbd75d62e34bfd3", + "url": "https://repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4.jar" + }, + { + "coord": "org.codehaus.janino:commons-compiler:jar:sources:3.1.4", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4-sources.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4-sources.jar" + ], + "sha256": "9bb6c96054cb61cfa1f215c7893b098ef9b26ac12e218b5595d463cc24d55c8c", + "url": "https://repo1.maven.org/maven2/org/codehaus/janino/commons-compiler/3.1.4/commons-compiler-3.1.4-sources.jar" + }, + { + "coord": "org.codehaus.janino:janino:3.1.4", + "dependencies": [ + "org.codehaus.janino:commons-compiler:3.1.4" + ], + "directDependencies": [ + "org.codehaus.janino:commons-compiler:3.1.4" + ], + "file": "v1/https/repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4.jar" + ], + "sha256": "234370ad8b26f76e4c6d92fa06340a36876a1157087ee0af26129ffd92103642", + "url": "https://repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4.jar" + }, + { + "coord": "org.codehaus.janino:janino:jar:sources:3.1.4", + "dependencies": [ + "org.codehaus.janino:commons-compiler:jar:sources:3.1.4" + ], + "directDependencies": [ + "org.codehaus.janino:commons-compiler:jar:sources:3.1.4" + ], + "file": "v1/https/repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4-sources.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4-sources.jar" + ], + "sha256": "f11953511f2c9a900cbb0af533f2156b72a644b54bc488dc24fab645d8f96b87", + "url": "https://repo1.maven.org/maven2/org/codehaus/janino/janino/3.1.4/janino-3.1.4-sources.jar" + }, { "coord": "org.codehaus.mojo:animal-sniffer-annotations:1.19", "dependencies": [], diff --git a/triggers/runner/src/main/resources/logback.xml b/triggers/runner/src/main/resources/logback.xml index fa8cfe474bef..9f73d032024a 100644 --- a/triggers/runner/src/main/resources/logback.xml +++ b/triggers/runner/src/main/resources/logback.xml @@ -2,7 +2,7 @@ - %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n diff --git a/triggers/service/src/test/resources/logback.xml b/triggers/service/src/test/resources/logback.xml index 302ef8604a17..fce08d05b526 100644 --- a/triggers/service/src/test/resources/logback.xml +++ b/triggers/service/src/test/resources/logback.xml @@ -1,7 +1,7 @@ - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n