Skip to content

Commit fb5de99

Browse files
committed
Add logging
1 parent 608f86d commit fb5de99

File tree

2 files changed

+4
-0
lines changed
  • Basic/ping-pong/workflows/src/main/java/net/corda/samples/pingpong/flows

2 files changed

+4
-0
lines changed

Basic/ping-pong/workflows/src/main/java/net/corda/samples/pingpong/flows/Ping.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ public Ping(Party counterparty) {
1919
@Override
2020
public Void call() throws FlowException {
2121
final FlowSession counterpartySession = initiateFlow(counterparty);
22+
getLogger().info("Pinging "+counterparty);
2223
final UntrustworthyData<String> counterpartyData = counterpartySession.sendAndReceive(String.class, "ping");
2324
counterpartyData.unwrap( msg -> {
25+
getLogger().info("Received "+msg+" from "+counterpartySession.getCounterparty().getName());
2426
assert(msg.equals("pong"));
2527
return true;
2628
});

Basic/ping-pong/workflows/src/main/java/net/corda/samples/pingpong/flows/Pong.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ public Pong(FlowSession counterpartySession) {
2222
public Void call() throws FlowException {
2323
UntrustworthyData<String> counterpartyData = counterpartySession.receive(String.class);
2424
counterpartyData.unwrap(msg -> {
25+
getLogger().info("Received "+msg + " from "+counterpartySession.getCounterparty().getName());
2526
assert (msg.equals("ping"));
2627
return true;
2728
});
29+
getLogger().info("Ponging "+counterpartySession.getCounterparty().getName());
2830
counterpartySession.send("pong");
2931
return null;
3032
}

0 commit comments

Comments
 (0)