You can also suppress certain log messages entirely as @cocreature detailed in the post below where he talks about how to do that with sandbox, but it can be done with any command, such as json-api:
java -Dlogback.configurationFile=./your-custom-logback.xml -jar ~/.daml/sdk/1.9.0/daml-sdk/daml-sdk.jar json-api --your-json-api-options
Snippet below but make sure to read the full post.
The other option is to sidestep the assistant completely. Note that this relies on details of the SDK tarball which are not guaranteed to be stable across versions. The JAR invoked by daml sandbox
is located at ~/.daml/sdk/$YOUR_SDK_VERSION/daml-sdk/daml-sdk.jar
. You can invoke that directly via java -jar
. Since there is a single JAR for the whole SDK you have to pass sandbox
as the first argument. Putting things together, you can launch sandbox with a given logback config as follows:
java -Dlogback.configurationFile=./logback.xml -jar ~/.daml/sdk/1.1.1/daml-sdk/daml-sdk.jar sandbox .daml/dist/foobar-0.0.1.dar
Sidenote
The log statement will be printed whenever it is evaluated. In thew new sandbox, this seems to happen twice (presumably once for validation) so you see the log statement twice as well. In Sandbox classic, it is only printed once.
1 Like