Skip to content

Commit

Permalink
Add Info message for delivery client
Browse files Browse the repository at this point in the history
Promote Debug message to Info message when peer starts
delivery client on a channel. This will help administrators
know which peer in an organization is communicating with
orderer, and troubleshoot block dissemination issues,
without requiring debug to be enabled.

Change-Id: I01fb12773ed2768a025267cf1008002fb3fe83dc
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
  • Loading branch information
denyeart committed Nov 7, 2019
1 parent 1ac3f05 commit 4b0e995
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/deliverservice/deliveryclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (d *deliverServiceImpl) StartDeliverForChannel(chainID string, ledgerInfo b
return errors.New(errMsg)
} else {
client := d.newClient(chainID, ledgerInfo)
logger.Debug("This peer will pass blocks from orderer service to other peers for channel", chainID)
logger.Info("This peer will retrieve blocks from ordering service and disseminate to other peers in the organization for channel", chainID)
d.deliverClients[chainID] = &deliverClient{
bp: blocksprovider.NewBlocksProvider(chainID, client, d.conf.Gossip, d.conf.CryptoSvc),
bclient: client,
Expand Down
4 changes: 2 additions & 2 deletions core/deliverservice/requester.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ func (b *blocksRequester) RequestBlocks(ledgerInfoProvider blocksprovider.Ledger
}

if height > 0 {
logger.Debugf("Starting deliver with block [%d] for channel %s", height, b.chainID)
logger.Infof("Starting deliver with block [%d] for channel %s", height, b.chainID)
if err := b.seekLatestFromCommitter(height); err != nil {
return err
}
} else {
logger.Debugf("Starting deliver with oldest block for channel %s", b.chainID)
logger.Infof("Starting deliver with oldest block for channel %s", b.chainID)
if err := b.seekOldest(); err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions gossip/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ func NewGossipStateProvider(chainID string, services *ServicesMediator, ledger l
stateMetrics: stateMetrics,
}

logger.Infof("Updating metadata information, "+
"current ledger sequence is at = %d, next expected block is = %d", height-1, s.payloads.Next())
logger.Infof("Updating metadata information for channel %s, "+
"current ledger sequence is at = %d, next expected block is = %d", chainID, height-1, s.payloads.Next())
logger.Debug("Updating gossip ledger height to", height)
services.UpdateLedgerHeight(height, common2.ChainID(s.chainID))

Expand Down

0 comments on commit 4b0e995

Please sign in to comment.