I am new to Hyperledger. I have deployed a chaincode on hyperledger v0.6 network. When i invoke a function(through CLI) ,only successful transaction id is returned. I don't see any print statements(which are there in the chain code) reflecting on the terminal. Please suggest what to do.
Asked
Active
Viewed 88 times
1 Answers
1
When chaincode contains print statements, the output from these statements is included in a chaincode log.
If you are using the Blockchain service on Bluemix, then you can view chaincode logs from the dashboard for the service. This is found on the “Network” tab by selecting a log file to the right of a particular chaincode ID.
For example, if you are using the Example02 chaincode, you should see output statements similar to the following: OUT - Aval = 90, Bval = 210
If you are using Docker containers, then the Docker logs for a chaincode container will have these output statements. There is a prior post that describes how to view chaincode logs using the docker logs
command.

Community
- 1
- 1

Andrew Tharp
- 276
- 1
- 3
-
Thanks, I am using Docker containers. I have checked above post and sorted my thing out. Now I am able to view the print – Thrinath Feb 23 '17 at 11:39
-
http://stackoverflow.com/questions/41095712/unable-to-print-to-logs-in-hyperledger-chaincode . This one also provides clear information about how to see the logs – Thrinath Feb 23 '17 at 11:41