digital-asset / daml

The Daml smart contract language
https://www.digitalasset.com/developers
797 stars 199 forks source link

Logging of succesful JSON API command submissions (at INFO) #9981

Closed cocreature closed 3 years ago

cocreature commented 3 years ago

A successful JSON API command submission will currently only produce a single log statement of the form

10:24:55.847 [http-json-ledger-api-akka.actor.default-dispatcher-5] INFO  com.daml.http.CommandService - Submitting createAndExercise command , context: {instance_uuid=b310a1c7-72fa-4295-9439-c869f6dbf5b6, request_id=3362a21d-9f3c-485d-94cf-c59acc7ce0ed, command_id=19c164d7-b43a-4730-9944-36e9bc81e67a}

There are a few points that are missing here:

  1. We only log when submitting the command. I’d like to see an additional log statement for the incoming request.
  2. We do not log that we send a successful response to the client.
realvictorprm commented 3 years ago

@cocreature I propose to just change this line here from logger.trace to logger.info because I don't see any reason to behave that much differently for the other endpoints (regarding your first point).

However if you have a different idea, I'm happy to hear it :)