daml/bazel_tools
Samir Talwar c764fbe573
contextualized-logging: Introduce different logging types for more structure. [KVL-996] (#10134)
* contextualized-logging: Automatically convert logging values to strings.

For now, this has almost the same behavior, but it allows us to
customize the output in the future.

The main change is that the log format has gone from:

    context: {a=b, x=1, foo=bar}

to:

    context: {a: "b", x: "1", foo: "bar"}

* contextualized-logging: Move `writeTo` inside `LoggingValue`.

* contextualized-logging: Allow for more than just strings.

`null`, numbers, and sequences are now correctly logged.

The log format has gone from:

    context: {a: "b", x: "1", foo: "bar", parties: "[alice, bob]"}

to:

    context: {a: "b", x: 1, foo: "bar", parties: ["alice", "bob"]}

CHANGELOG_BEGIN
- The log output of Daml components has changed so that the structured
  part is closer to JSON. This allows us to distinguish and parse
  numbers and lists. If you are parsing this log output, you may need to
  change your parser.

  The log output has changed from:

  .. code-block::

     context: {a=b, x=1, foo=bar, parties=[alice, bob]}

  to:

  .. code-block::

     context: {a: "b", x: 1, foo: "bar", parties: ["alice", "bob"]}

CHANGELOG_END

* contextualized-logging: Extract the string serializer.

* Use non-string logging where possible.

* contextualized-logging: Split logging values from serialization.

So that callers don't have to know about Jackson.

* contextualized-logging: `SeqView` is `Iterable`. Don't need both.

* contextualized-logging: Make `ToStringToLoggingValue` a `val`.

Co-Authored-By: Stephen Compall <stephen.compall@daml.com>

* contextualized-logging: Add a transient dependency for 2.12 only.

This required more infrastructure than I thought it would.

* kvutils: Make it explicit that we're logging the hashes of archives.

The implicit was found to be a little confusing.

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2021-06-29 09:16:26 +00:00
..
client_server Add golden test for example Daml ledger export (#9732) 2021-05-19 12:02:14 +00:00
dev_env_tool update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
java_testing update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
packaging fix: set LOCAL_ARCHIVE when unset (#8627) 2021-01-26 15:52:24 +01:00
runfiles Upgrade scalafmt and enable trailing commas (#8437) 2021-01-09 11:37:37 +01:00
scalapb Upgrade protobuf-java and scalapb. [KVL-938] (#9713) 2021-05-27 13:41:28 +00:00
sh Add golden test for example Daml ledger export (#9732) 2021-05-19 12:02:14 +00:00
absl-mingw.patch Upgrade gRPC C library (#8693) 2021-02-01 16:11:06 +01:00
build_environment.bzl update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
BUILD.bazel Upgrade Scala 2.12 to v2.12.13. (#9280) 2021-03-30 11:02:18 +00:00
create_workspace.bzl update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
fat_cc_library.bzl Upgrade to Bazel 4.0 (#8798) 2021-02-11 10:08:47 +01:00
ghc_dwarf.bzl update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
grpc-bazel-apple.patch Pin rules_apple (#6845) 2020-07-24 09:47:05 +02:00
grpc-bazel-mingw.patch Upgrade gRPC C library (#8693) 2021-02-01 16:11:06 +01:00
grpc-haskell-core-cpp-options.patch Replace Hazel by stack_snapshot (#2743) 2019-11-22 14:24:08 +00:00
grpc-haskell-core-upgrade.patch Upgrade gRPC C library (#8693) 2021-02-01 16:11:06 +01:00
haskell_proto3_suite_deriving_defaults.patch Disable deriving-defaults per file (#8684) 2021-01-29 11:01:55 +00:00
haskell-c2hs.patch Building c2hs (#355) 2019-04-10 15:12:08 +02:00
haskell-cc-wrapper-windows.patch Switch to GHC 8.10.3 (#8394) 2021-01-25 11:53:53 +00:00
haskell-ghcide-binary-q.patch Enable assertions in Haskell builds (#6853) 2020-07-24 14:29:25 +00:00
haskell-ghcide-expose-compat.patch Bump ghcide (#5103) 2020-03-20 16:43:59 +00:00
haskell-hie-bios.patch Bump ghc-ghcide (#2936) 2019-09-18 10:29:02 +02:00
haskell-js-dgtable.patch Embed shake data-files via TH (#4584) 2020-02-18 17:53:27 +01:00
haskell-js-flot.patch Embed shake data-files via TH (#4584) 2020-02-18 17:53:27 +01:00
haskell-js-jquery.patch Embed shake data-files via TH (#4584) 2020-02-18 17:53:27 +01:00
haskell-lsp-test-no-reexport.patch Upgrade ghcide and haskell-lsp (#3499) 2019-11-18 10:56:19 +00:00
haskell-opt.patch upgrade rules_haskell (#6284) 2020-06-10 17:21:31 +02:00
haskell-shake.patch Embed shake data-files via TH (#4584) 2020-02-18 17:53:27 +01:00
haskell-strict-source-names.patch Update rules_haskell (#8987) 2021-03-03 10:40:26 +01:00
haskell-windows-extra-libraries.patch Switch to GHC 8.10.3 (#8394) 2021-01-25 11:53:53 +00:00
haskell-windows-remove-fake-libs.patch Switch to GHC 8.10.3 (#8394) 2021-01-25 11:53:53 +00:00
haskell-zip.patch Patch zip library to not use temp files (#5621) 2020-04-20 08:35:11 +00:00
haskell.bzl Switch to GHC 8.10.3 (#8394) 2021-01-25 11:53:53 +00:00
hlint.bzl update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
java.bzl update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
javadoc_library.bzl update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
nixpkgs-disable-http2.patch upgrade rules_nixpkgs (#8078) 2020-11-30 14:36:46 +00:00
oracle.bzl Switch to an environment variable for enabling Oracle tests. (#9511) 2021-04-27 11:50:39 +00:00
os_info.bzl update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
pkg.bzl update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
pom_file.bzl Publish nameof library (#9798) 2021-05-26 09:58:02 +00:00
pom_template.xml rename master to main (#8245) 2020-12-27 14:19:07 +01:00
proto.bzl Upgrade protobuf-java and scalapb. [KVL-938] (#9713) 2021-05-27 13:41:28 +00:00
protobuf-win32.patch Upgrade grpc and protobuf libraries (#8558) 2021-01-26 14:17:18 +00:00
remote_apis_no_services.patch Clean broken entries from the Bazel cache (#8668) 2021-01-28 17:57:09 +00:00
rules_nodejs_bash.patch open-sourcing daml 2019-04-04 09:33:38 +01:00
rules_nodejs_node_dependency.patch Enforce a dependency on node_nix (#6035) 2020-05-19 16:58:00 +00:00
rules_nodejs_npm_cli_path.patch Bazelify daml json types (#4110) 2020-01-20 15:02:33 +00:00
rules_scala_suite_tags.patch Pass along tags in da_scala_test_suite (#9521) 2021-04-28 09:14:27 +02:00
rules-nixpkgs-llvm-cov.patch Upgrade to Bazel 4.0 (#8798) 2021-02-11 10:08:47 +01:00
scala_version.bzl Switch Scala default to 2.13 (#9699) 2021-05-17 15:04:53 +00:00
scala-escape-jvmflags.patch Upgrade rules_scala (#6883) 2020-07-28 08:53:12 +00:00
scala.bzl contextualized-logging: Introduce different logging types for more structure. [KVL-996] (#10134) 2021-06-29 09:16:26 +00:00
scalapb.bzl Upgrade protobuf-java and scalapb. [KVL-938] (#9713) 2021-05-27 13:41:28 +00:00