Blockchain Development with Hyperledger
by Salman A. Baset, Luc Desrosiers, Nitin Gaur, Petr Novotny
Stdout and stderr
As well as the logging mechanisms provided by the SHIM API and integrated with the peer, during the development phase, the chaincode can use the standard output files. The chaincode is executed as an independent process and can therefore use the standard output (stdout) and standard error (stderr) files to record output using standard Go printing functions (for example, fmt.Printf(...) and os.Stdout). By default, the standard outputs are available in Dev mode, when the chaincode process is started independently.
In a production environment when the chaincode process is managed by the peer, the standard output is disabled for security reasons. When required, it can be enabled by setting the configuration variable CORE_VM_DOCKER_ATTACHSTDOUT ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access