Skip to content

Commit

Permalink
[FAB-3287] Fix debug statements in orderer package
Browse files Browse the repository at this point in the history
Change-Id: If8fd43e256bfcf6a8d3f21a3262707ccc5e3c134
Signed-off-by: Kostas Christidis <kostas@christidis.io>
  • Loading branch information
kchristidis authored and ghaskins committed Apr 24, 2017
1 parent 8ce1073 commit 1dfd0aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion orderer/common/broadcast/broadcast.go
Expand Up @@ -74,6 +74,7 @@ func NewHandlerImpl(sm SupportManager) Handler {

// Handle starts a service thread for a given gRPC connection and services the broadcast connection
func (bh *handlerImpl) Handle(srv ab.AtomicBroadcast_BroadcastServer) error {
logger.Debugf("Starting new broadcast loop")
for {
msg, err := srv.Recv()
if err == io.EOF {
Expand Down Expand Up @@ -142,7 +143,7 @@ func (bh *handlerImpl) Handle(srv ab.AtomicBroadcast_BroadcastServer) error {
}

if logger.IsEnabledFor(logging.DEBUG) {
logger.Debugf("Broadcast is filtering message of type %d for channel %s", chdr.Type, chdr.ChannelId)
logger.Debugf("Broadcast is filtering message of type %s for channel %s", cb.HeaderType_name[chdr.Type], chdr.ChannelId)
}

// Normal transaction for existing chain
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/deliver/deliver.go
Expand Up @@ -128,7 +128,7 @@ func (ds *deliverServer) Handle(srv ab.AtomicBroadcast_DeliverServer) error {
}

if logger.IsEnabledFor(logging.DEBUG) {
logger.Debugf("Received seekInfo (%p) %v for chain %s", seekInfo, seekInfo, chdr.ChannelId)
logger.Debugf("Received seekInfo (%p) %v for chain %s", seekInfo, seekInfo, chdr.ChannelId)
}

cursor, number := chain.Reader().Iterator(seekInfo.Start)
Expand Down
2 changes: 1 addition & 1 deletion orderer/kafka/orderer.go
Expand Up @@ -292,7 +292,7 @@ func (ch *chainImpl) loop() {
continue
}
batches, committers, ok := ch.support.BlockCutter().Ordered(env)
logger.Debugf("[channel: %s] Ordering results: batches: %v, ok: %v", ch.support.ChainID(), batches, ok)
logger.Debugf("[channel: %s] Ordering results: items in batch = %v, ok = %v", ch.support.ChainID(), batches, ok)
if ok && len(batches) == 0 && timer == nil {
timer = time.After(ch.batchTimeout)
logger.Debugf("[channel: %s] Just began %s batch timer", ch.support.ChainID(), ch.batchTimeout.String())
Expand Down

0 comments on commit 1dfd0aa

Please sign in to comment.