Skip to content

Commit

Permalink
correct logger labels after cloning block puller.
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Guo <guojiannan1101@gmail.com>
  • Loading branch information
guoger authored and C0rWin committed Sep 28, 2021
1 parent f97177c commit 83cabf2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions orderer/common/cluster/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func (r *Replicator) PullChannel(channel string) error {
puller := r.Puller.Clone()
defer puller.Close()
puller.Channel = channel
puller.Logger = flogging.MustGetLogger("orderer.common.cluster.replication").With("channel", channel)

ledger, err := r.LedgerFactory.GetOrCreate(channel)
if err != nil {
Expand Down Expand Up @@ -294,6 +295,7 @@ func (r *Replicator) channelsToPull(channels GenesisBlocks) channelPullHints {
for _, channel := range channels {
r.Logger.Info("Probing whether I should pull channel", channel.ChannelName)
puller := r.Puller.Clone()
puller.Logger = flogging.MustGetLogger("orderer.common.cluster.replication").With("channel", channel.ChannelName)
puller.Channel = channel.ChannelName
// Disable puller buffering when we check whether we are in the channel,
// as we only need to know about a single block.
Expand Down

0 comments on commit 83cabf2

Please sign in to comment.