node.js - How to write console statement in hyperledger composer
问题描述
I have the transaction code in Hyperledger composer. How to print all the console statements when the transaction called from the nodejs application.
解决方案
运行时日志:
如果你运行docker ps -a
,你应该看到基本运行的 docker 容器。其中一个 docker 容器将是一个链码容器(您正在运行的业务网络)。您将看到容器的特定容器 ID。
然后期待使用您将在您的终端中docker logs <container id>
看到您的信息。console.log()
您可以使用以下方式跟踪日志docker logs -f
开发者日志:
您可以在开发者控制台中看到输出。例如,在 Firefox 和 Chrome 浏览器中——点击CTRL-SHIFT-I
它会弹出——然后进入控制台,你可以看到你的控制台日志信息。
希望它会帮助你:)
推荐阅读
- postgresql - Scheduler in Postgres
- r - No applicable method for 'mutate_' applied to an object of class "logical"
- java - 使用 Quorum 进行集成测试
- sql - 包括缺失的列
- android - 设备所有者应用在辅助用户中没有权限
- amazon-s3 - AWS Glue:使用作业书签进行增量加载时无法推断架构
- android - Migrate method RxJava1 to RxJava2
- r - Firth's Logistic Regression
- sql - 按选择部分中的 CAST 字段分组?
- r - R 官员 更新形状的文本