Skip to content

Commit 1dfd0aa

Browse files
Kostas Christidisghaskins
authored andcommitted
[FAB-3287] Fix debug statements in orderer package
Change-Id: If8fd43e256bfcf6a8d3f21a3262707ccc5e3c134 Signed-off-by: Kostas Christidis <kostas@christidis.io>
1 parent 8ce1073 commit 1dfd0aa

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

orderer/common/broadcast/broadcast.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ func NewHandlerImpl(sm SupportManager) Handler {
7474

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

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

148149
// Normal transaction for existing chain

orderer/common/deliver/deliver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (ds *deliverServer) Handle(srv ab.AtomicBroadcast_DeliverServer) error {
128128
}
129129

130130
if logger.IsEnabledFor(logging.DEBUG) {
131-
logger.Debugf("Received seekInfo (%p) %v for chain %s", seekInfo, seekInfo, chdr.ChannelId)
131+
logger.Debugf("Received seekInfo (%p) %v for chain %s", seekInfo, seekInfo, chdr.ChannelId)
132132
}
133133

134134
cursor, number := chain.Reader().Iterator(seekInfo.Start)

orderer/kafka/orderer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ func (ch *chainImpl) loop() {
292292
continue
293293
}
294294
batches, committers, ok := ch.support.BlockCutter().Ordered(env)
295-
logger.Debugf("[channel: %s] Ordering results: batches: %v, ok: %v", ch.support.ChainID(), batches, ok)
295+
logger.Debugf("[channel: %s] Ordering results: items in batch = %v, ok = %v", ch.support.ChainID(), batches, ok)
296296
if ok && len(batches) == 0 && timer == nil {
297297
timer = time.After(ch.batchTimeout)
298298
logger.Debugf("[channel: %s] Just began %s batch timer", ch.support.ChainID(), ch.batchTimeout.String())

0 commit comments

Comments
 (0)