Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
fix(parity-clib): update Java example
Browse files Browse the repository at this point in the history
* Update example to the API changes
* Remove needless printouts which can be controlled via logger instead
  • Loading branch information
niklasad1 committed Jan 30, 2019
1 parent 1efbb72 commit c93e31c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions parity-clib/examples/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class Main {
};

public static void runParity(String[] config) {
Parity parity = new Parity(config);
String loggerMode = "rpc=trace";
String loggerFile = "foo.log";
Parity parity = new Parity(config, loggerMode, loggerFile);

Callback rpcCallback = new Callback(1);
Callback webSocketCallback = new Callback(2);
Expand Down Expand Up @@ -94,12 +96,6 @@ public Callback(int type) {
}

public void callback(Object response) {
response = (String) response;
if (callbackType == 1) {
System.out.println("rpc: " + response);
} else if (callbackType == 2) {
System.out.println("ws: " + response);
}
counter.getAndIncrement();
}

Expand Down

0 comments on commit c93e31c

Please sign in to comment.