1

我无法在 Hyperledger Fabric 1.4 上的 nodejs 中读取我的链码日志我正在尝试通过以下方式读取日志:

`docker logs -f <<chaincode_container_instance>>`

但我能看到的唯一日志是:

`async instantiate(ctx) {
         console.log('Instantiate the contract');
    }`

这里是:

` > fabric-chaincode-node start "--peer.address" "peer0.org1.example.com:7052"
(node:16) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
Command succeeded
Instantiate the contract`

但不是我的交易日志:

`async createDocument(ctx, documentId, name, hash, owner, sector, timeStamp) {
     console.log("id: "+ documentId+"timeStamp: "+ timeStamp);
             ...
         <<REST OF THE CODE>>`

并且事务执行没问题,因为我可以在 couchdb 上看到一个新寄存器。

4

1 回答 1

1

已解决:在开发过程中,我停止了基本网络并再次启动它。然后我再次安装了链代码,但 docker 图像是以前的,所以我没有更新更改。删除合约实例的图像会更新更改并显示跟踪。

于 2019-02-07T12:06:27.270 回答