According to the documentation to get each worker to perform logging all you need to do is add
monitors:
transaction:
- module: logging
However if you do that it will fail with
2022.08.08-17:22:00.892 error [caliper] [worker-message-handler] Error while handling "initialize" message for Worker#1 (57091): TypeError: Cannot read property 'loggerModuleName' of undefined
at new LoggingTxObserver (/root/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/tx-observers/logging-tx-observer.js:34:53)
at createTxObserver (/root/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/tx-observers/logging-tx-observer.js:78:12)
at new TxObserverDispatch (/root/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/tx-observers/tx-observer-dispatch.js:49:35)
at new CaliperWorker (/root/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/caliper-worker.js:44:35)
at WorkerMessageHandler._handleInitializeMessage (/root/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/worker-message-handler.js:186:27)
at async ProcessMessenger.<anonymous> (/root/caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/worker-message-handler.js:85:13)
if you just add the options block it will fail in a similar manner but with null instead of undefined
According to the documentation to get each worker to perform logging all you need to do is add
However if you do that it will fail with
if you just add the options block it will fail in a similar manner but with
null
instead ofundefined
To make it work this will suffice
Looking at the code though, this does have options
which are undocumented
This seems to be an interesting way to enable logging on all workers and the documentation should reflect this