From ca71cd97c0b2271e4162b61bd0152f47d8823db8 Mon Sep 17 00:00:00 2001 From: Dave Enyeart Date: Mon, 13 Mar 2023 05:36:42 -0400 Subject: [PATCH] Extend logging doc with typical examples (#4086) Add typical logging levels to logging doc to assist with troubleshooting. Signed-off-by: David Enyeart (cherry picked from commit 077776f137e0343f90fb443c5617ca38454e0d55) --- docs/source/logging-control.rst | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/source/logging-control.rst b/docs/source/logging-control.rst index a0928d473ed..b1e6fdc1b84 100644 --- a/docs/source/logging-control.rst +++ b/docs/source/logging-control.rst @@ -94,6 +94,41 @@ a format string, such as the default to print the logs in a human-readable console format. It can be also set to ``json`` to output logs in JSON format. +Typical debug levels +-------------------- + +This section provides some typical log levels to debug various areas of a peer node or ordering service node by setting the ``FABRIC_LOGGING_SPEC`` environment variable. + +Peer smart contract debug: + +:: + + FABRIC_LOGGING_SPEC=info:dockercontroller,endorser,chaincode,chaincode.platform=debug + +Peer private data debug: + +:: + + FABRIC_LOGGING_SPEC=info:kvledger,ledgerstorage,transientstore,pvtdatastorage,gossip.privdata=debug + +Peer ledger and state database debug: + +:: + + FABRIC_LOGGING_SPEC=info:kvledger,lockbasedtxmgr,ledgerstorage,stateleveldb,statecouchdb,couchdb=debug + +Peer full debug, with the noisy components set to info: + +:: + + FABRIC_LOGGING_SPEC=debug:cauthdsl,policies,msp,grpc,peer.gossip.mcs,gossip,leveldbhelper=info + +Ordering node full debug, with the noisy components set to info: + +:: + + FABRIC_LOGGING_SPEC=debug:cauthdsl,policies,msp,grpc,orderer.consensus.etcdraft,orderer.common.cluster,orderer.common.cluster.step,common.configtx,blkstorage=info + Chaincode ---------