daml/libs-scala
Samir Talwar e7e8a5705b
daml-lf/data: Optionally truncate party names in structured logs. [KVL-996] (#10163)
* daml-lf/data: Truncate party names in log output, on request.

The party name can grow quite long, so we offer ledger implementors the
opportunity to truncate it in structured log output.

Unfortunately, because we use Logback through the global
`LoggerFactory`, there is no place to inject logging configuration. This
means we also need to use global, mutable state to configure logging
output. I have added a `LoggingConfiguration` class+object in Daml-LF
Data, which may not be the best place, but I can't think of a better
one right now. I suggest we leave it there until it has reason to grow,
at which point we may want to move it.

CHANGELOG_BEGIN
CHANGELOG_END

* logging-entries: Make `ToLoggingValue` mixin-able.

* participant-integration-api: Truncate parties in filters when logging.

* participant-integration-api: Cast to `Party` for logging.

Invalid input should not break the request at this point. No assertions.

* daml-lf/data: Move `Party to LoggingValue` to a new package.

This avoids the transitive dependency issue most of the time.

* daml-lf-data: Move the `Identifier` logging to another package.

Again, reduces the need for transitively depending on _logging-entries_.
2021-07-01 16:50:49 +00:00
..
adjustable-clock update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
auth-utils update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
build-info update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
concurrent Switch from @silent to @nowarn. (#9498) 2021-04-26 19:46:14 +00:00
contextualized-logging logging-entries: Split from contextualized-logging. [KVL-996] (#10149) 2021-06-30 12:08:33 +00:00
doobie-slf4j Add //libs-scala/doobie-slf4j and replace usages of jdkLogHandler (#8731) 2021-02-03 10:45:05 +00:00
flyway-testing Upgrade scalafmt and enable trailing commas (#8437) 2021-01-09 11:37:37 +01:00
fs-utils Example export (#9756) 2021-05-21 09:36:25 +02:00
gatling-utils prepare for upgrade to Scalaz 7.3.3 (#9997) 2021-06-15 14:41:48 -04:00
grpc-reverse-proxy Enhance grpc-test-utils and grpc-reverse-proxy to use Resources (#8606) 2021-01-25 13:27:48 +01:00
grpc-server-reflection-client Enhance grpc-test-utils and grpc-reverse-proxy to use Resources (#8606) 2021-01-25 13:27:48 +01:00
grpc-test-utils Enhance grpc-test-utils and grpc-reverse-proxy to use Resources (#8606) 2021-01-25 13:27:48 +01:00
grpc-utils Enhance grpc-test-utils and grpc-reverse-proxy to use Resources (#8606) 2021-01-25 13:27:48 +01:00
logging-entries daml-lf/data: Optionally truncate party names in structured logs. [KVL-996] (#10163) 2021-07-01 16:50:49 +00:00
nameof Publish nameof library (#9798) 2021-05-26 09:58:02 +00:00
oracle-testing index json-api signatories and observers on Oracle (#9895) 2021-06-17 11:52:37 -04:00
ports Upgrade scalafmt and enable trailing commas (#8437) 2021-01-09 11:37:37 +01:00
postgresql-testing Add runner for non-repudiation (#9076) 2021-03-11 10:57:50 +01:00
resources resources: Only mutate test mock objects inside synchronized blocks. (#9869) 2021-06-01 12:50:42 +00:00
resources-akka resources: Remove the default factories. (#8645) 2021-01-27 15:56:29 +00:00
resources-grpc Restrict extensibility of ServerResourceOwner (#8660) 2021-01-28 10:47:28 +00:00
scala-utils TODO Cleanup: store.backend package (#9693) 2021-05-18 16:07:54 +00:00
scalatest-utils Upgrade scalafmt and enable trailing commas (#8437) 2021-01-09 11:37:37 +01:00
timer-utils Upgrade scalafmt and enable trailing commas (#8437) 2021-01-09 11:37:37 +01:00