Skip to content

Commit

Permalink
Add channel name to blockpuller logger
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Guo <guojiannan1101@gmail.com>
  • Loading branch information
guoger committed Jan 9, 2020
1 parent 02f85b4 commit 5d2cb8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion orderer/common/cluster/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ func BlockPullerFromConfigBlock(conf PullerConfig, block *common.Block, verifier
}

return &BlockPuller{
Logger: flogging.MustGetLogger("orderer.common.cluster.replication"),
Logger: flogging.MustGetLogger("orderer.common.cluster.replication").With("channel", conf.Channel),
Dialer: dialer,
TLSCert: tlsCertAsDER.Bytes,
VerifyBlockSequence: func(blocks []*common.Block, channel string) error {
Expand Down
2 changes: 1 addition & 1 deletion orderer/consensus/etcdraft/blockpuller.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func NewBlockPuller(support consensus.ConsenterSupport,

bp := &cluster.BlockPuller{
VerifyBlockSequence: verifyBlockSequence,
Logger: flogging.MustGetLogger("orderer.common.cluster.puller"),
Logger: flogging.MustGetLogger("orderer.common.cluster.puller").With("channel", support.ChannelID()),
RetryTimeout: clusterConfig.ReplicationRetryTimeout,
MaxTotalBufferBytes: clusterConfig.ReplicationBufferSize,
FetchTimeout: clusterConfig.ReplicationPullTimeout,
Expand Down

0 comments on commit 5d2cb8f

Please sign in to comment.