daml/libs-scala/contextualized-logging/BUILD.bazel
Samir Talwar c929a14486
logging-entries: Split from contextualized-logging. [KVL-996] (#10149)
* logging-entries: Split from contextualized-logging.

This allows us to introduce it to Daml-LF without bringing in the
Logback, Logstash, and gRPC dependencies.

CHANGELOG_BEGIN
CHANGELOG_END

* logging-entries: Fix dependencies for 2.12.

* logging-entries: Missed one more Scala 2.12 dependency.

* release: Publish logging-entries.
2021-06-30 12:08:33 +00:00

61 lines
2.0 KiB
Python

# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load(
"//bazel_tools:scala.bzl",
"da_scala_library",
"da_scala_test_suite",
)
da_scala_library(
name = "contextualized-logging",
srcs = glob(["src/main/scala/**/*.scala"]),
scala_deps = [
"@maven//:com_typesafe_akka_akka_actor",
"@maven//:com_typesafe_akka_akka_stream",
],
scalacopts = ["-Xsource:2.13"],
tags = ["maven_coordinates=com.daml:contextualized-logging:__VERSION__"],
versioned_scala_deps = {
"2.12": ["@maven//:org_scala_lang_modules_scala_collection_compat"],
},
visibility = [
"//visibility:public",
],
deps = [
"//libs-scala/grpc-utils",
"//libs-scala/logging-entries",
"@maven//:com_fasterxml_jackson_core_jackson_core",
"@maven//:io_grpc_grpc_api",
"@maven//:net_logstash_logback_logstash_logback_encoder",
"@maven//:org_slf4j_slf4j_api",
],
)
da_scala_test_suite(
name = "contextualized-logging-tests",
srcs = glob(["src/test/suite/**/*.scala"]),
resources = glob(["src/test/suite/resources/**/*"]),
scala_deps = [
"@maven//:com_chuusai_shapeless",
"@maven//:com_typesafe_akka_akka_actor",
"@maven//:com_typesafe_akka_akka_stream",
"@maven//:io_circe_circe_core",
"@maven//:io_circe_circe_generic",
"@maven//:io_circe_circe_parser",
"@maven//:org_mockito_mockito_scala",
"@maven//:org_typelevel_cats_core",
"@maven//:org_typelevel_cats_kernel",
],
deps = [
":contextualized-logging",
"//libs-scala/logging-entries",
"@maven//:ch_qos_logback_logback_classic",
"@maven//:ch_qos_logback_logback_core",
"@maven//:com_fasterxml_jackson_core_jackson_core",
"@maven//:net_logstash_logback_logstash_logback_encoder",
"@maven//:org_mockito_mockito_core",
"@maven//:org_slf4j_slf4j_api",
],
)