dongqun9403
2019-03-15 18:15
浏览 318
已采纳

在Hyperledger架构中,如何打印出链码函数的消息和日志?

I want to test my chaincode by Golang, so I have used Hyperledger fabric chaincodedev test.

All functions of chaincode (invoke, query, etc.) worked, but there are no logs and messages of chaincode on console.

Logging is set to "debug" in every case.

I want to print out result message of invoke, query on console, but just print out message: "myc"; "myc"; "myc"; ...

2019-03-15 18:07:04.550 UTC [shim] setupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO
2019-03-15 18:07:04.550 UTC [shim] setupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ...
2019-03-15 18:07:04.551 UTC [bccsp] initBCCSP -> DEBU 001 Initialize BCCSP [SW]
2019-03-15 18:07:04.551 UTC [grpc] DialContext -> DEBU 002 parsed scheme: ""
2019-03-15 18:07:04.551 UTC [grpc] DialContext -> DEBU 003 scheme "" not registered, fallback to default scheme
2019-03-15 18:07:04.551 UTC [grpc] watcher -> DEBU 004 ccResolverWrapper: sending new addresses to cc: [{peer:7052 0  <nil>}]
2019-03-15 18:07:04.551 UTC [grpc] switchBalancer -> DEBU 005 ClientConn switching balancer to "pick_first"
2019-03-15 18:07:04.551 UTC [grpc] HandleSubConnStateChange -> DEBU 006 pickfirstBalancer: HandleSubConnStateChange: 0xc00038eca0, CONNECTING
2019-03-15 18:07:04.552 UTC [grpc] HandleSubConnStateChange -> DEBU 007 pickfirstBalancer: HandleSubConnStateChange: 0xc00038eca0, READY

myc myc myc myc myc myc myc

enter image description here

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题