Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daml-lf/data: Optionally truncate party names in structured logs. [KVL-996] #10163

Merged
merged 6 commits into from
Jul 1, 2021
Prev Previous commit
Next Next commit
participant-integration-api: Cast to Party for logging.
Invalid input should not break the request at this point. No assertions.
  • Loading branch information
SamirTalwar committed Jul 1, 2021
commit cba2fd66cd230aea37ec2f1967f0588b9d780046
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,25 @@ package object logging {
"parties" -> partyNames

private[services] def partyStrings(partyNames: Iterable[String]): LoggingEntry =
parties(partyNames.view.map(Party.assertFromString))
parties(partyNames.asInstanceOf[Iterable[Party]])

private[services] def party(partyName: Party): LoggingEntry =
"parties" -> Seq(partyName)

private[services] def partyString(partyName: String): LoggingEntry =
party(Party.assertFromString(partyName))
party(partyName.asInstanceOf[Party])

private[services] def actAs(partyNames: Iterable[Party]): LoggingEntry =
"actAs" -> partyNames

private[services] def actAsStrings(partyNames: Iterable[String]): LoggingEntry =
actAs(partyNames.view.map(Party.assertFromString))
actAs(partyNames.asInstanceOf[Iterable[Party]])

private[services] def readAs(partyNames: Iterable[Party]): LoggingEntry =
"readAs" -> partyNames

private[services] def readAsStrings(partyNames: Iterable[String]): LoggingEntry =
readAs(partyNames.view.map(Party.assertFromString))
readAs(partyNames.asInstanceOf[Iterable[Party]])

private[services] def startExclusive(offset: LedgerOffset): LoggingEntry =
"startExclusive" -> offset
Expand Down