Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Admin] add log level customization command #1362

Merged
merged 7 commits into from
Oct 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions engine/common/synchronization/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,14 @@ func (e *Engine) processAvailableResponses() {

// onSyncResponse processes a synchronization response.
func (e *Engine) onSyncResponse(originID flow.Identifier, res *messages.SyncResponse) {
e.log.Debug().Str("origin_id", originID.String()).Msg("received sync response")
e.log.Info().Str("origin_id", originID.String()).Msg("received sync response")
final := e.finalizedHeader.Get()
e.core.HandleHeight(final, res.Height)
}

// onBlockResponse processes a response containing a specifically requested block.
func (e *Engine) onBlockResponse(originID flow.Identifier, res *messages.BlockResponse) {
e.log.Debug().Str("origin_id", originID.String()).Msg("received block response")
e.log.Info().Str("origin_id", originID.String()).Msg("received block response")
// process the blocks one by one
for _, block := range res.Blocks {
if !e.core.HandleBlock(block.Header) {
Expand Down Expand Up @@ -353,7 +353,7 @@ func (e *Engine) pollHeight() {
Nonce: rand.Uint64(),
Height: head.Height,
}
e.log.Debug().
e.log.Info().
Uint64("height", req.Height).
Uint64("range_nonce", req.Nonce).
Msg("sending sync request")
Expand All @@ -380,7 +380,7 @@ func (e *Engine) sendRequests(participants flow.IdentifierList, ranges []flow.Ra
errs = multierror.Append(errs, fmt.Errorf("could not submit range request: %w", err))
continue
}
e.log.Debug().
e.log.Info().
Uint64("range_from", req.FromHeight).
Uint64("range_to", req.ToHeight).
Uint64("range_nonce", req.Nonce).
Expand All @@ -399,7 +399,7 @@ func (e *Engine) sendRequests(participants flow.IdentifierList, ranges []flow.Ra
errs = multierror.Append(errs, fmt.Errorf("could not submit batch request: %w", err))
continue
}
e.log.Debug().
e.log.Info().
Strs("block_ids", flow.IdentifierList(batch.BlockIDs).Strings()).
Uint64("range_nonce", req.Nonce).
Msg("batch requested")
Expand Down
4 changes: 2 additions & 2 deletions engine/consensus/compliance/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (c *Core) OnBlockProposal(originID flow.Identifier, proposal *messages.Bloc
ancestorHeight = ancestor.Header.Height - 1
}

log.Debug().
log.Info().
Uint64("ancestor_height", ancestorHeight).
Hex("ancestor_id", ancestorID[:]).
Msg("requesting missing ancestor for proposal")
Expand All @@ -182,7 +182,7 @@ func (c *Core) OnBlockProposal(originID flow.Identifier, proposal *messages.Bloc

c.mempool.MempoolEntries(metrics.ResourceProposal, c.pending.Size())

log.Debug().Msg("requesting missing parent for proposal")
log.Info().Msg("requesting missing parent for proposal")

c.sync.RequestBlock(header.ParentID)

Expand Down