From 37ee5f17db9869d0266f56c09221988f7221b062 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 3 Apr 2017 17:52:44 -0400 Subject: [PATCH] better logs --- utils/fc_wrangler/enrollment.js | 12 +++++++++++- utils/fc_wrangler/query_cc.js | 10 +++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/utils/fc_wrangler/enrollment.js b/utils/fc_wrangler/enrollment.js index bb9cd2945..5b71a5dbb 100644 --- a/utils/fc_wrangler/enrollment.js +++ b/utils/fc_wrangler/enrollment.js @@ -47,7 +47,17 @@ module.exports = function (logger) { return; } - logger.info('[fcw] Going to enroll for mspId ', options); + var debug = { // this is just for console printing, no PEM here + peer_urls: options.peer_urls, + channel_id: options.channel_id, + uuid: options.uuid, + ca_url: options.ca_url, + orderer_url: options.orderer_url, + enroll_id: options.enroll_id, + enroll_secret: options.enroll_secret, + msp_id: options.msp_id + }; + logger.info('[fcw] Going to enroll for mspId ', debug); // Make eCert kvs (Key Value Store) HFC.newDefaultKeyValueStore({ diff --git a/utils/fc_wrangler/query_cc.js b/utils/fc_wrangler/query_cc.js index de780a6ae..d3fbd702b 100644 --- a/utils/fc_wrangler/query_cc.js +++ b/utils/fc_wrangler/query_cc.js @@ -33,7 +33,15 @@ module.exports = function (logger) { txId: chain.buildTransactionID(nonce, obj.submitter), nonce: nonce, }; - logger.debug('[fcw] Sending query req', request); + var debug = { // this is just for console printing, no NONCE here + chainId: options.channel_id, + chaincodeId: options.chaincode_id, + chaincodeVersion: options.chaincode_version, + fcn: options.cc_function, + args: options.cc_args, + txId: chain.buildTransactionID(nonce, obj.submitter), + }; + logger.debug('[fcw] Sending query req', debug); chain.queryByChaincode(request //nothing