Skip to content

Commit

Permalink
Merge pull request #893 from iotaledger/feat/update-log-level
Browse files Browse the repository at this point in the history
Update log levels.
  • Loading branch information
muXxer authored Mar 28, 2024
2 parents 3bfd659 + ffa8beb commit a1b42be
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/protocol/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func provide(c *dig.Container) error {

func configure() error {
deps.Protocol.Network.OnBlockReceived(func(block *model.Block, _ peer.ID) {
Component.LogDebugf("BlockReceived: %s", block.ID())
Component.LogTracef("BlockReceived: %s", block.ID())
})
deps.Protocol.Network.OnCommitmentRequestReceived(func(commitmentID iotago.CommitmentID, _ peer.ID) {
Component.LogDebugf("SlotCommitmentRequestReceived: %s", commitmentID)
Expand Down
6 changes: 3 additions & 3 deletions pkg/protocol/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ func attachEngineLogs(instance *engine.Engine) func() {
}).Unhook,

events.Notarization.SlotCommitted.Hook(func(details *notarization.SlotCommittedDetails) {
instance.LogTrace("NotarizationManager.SlotCommitted", "commitment", details.Commitment.ID(), "acceptedBlocks count", details.AcceptedBlocks.Size(), "accepted transactions", len(details.Mutations))
instance.LogDebug("NotarizationManager.SlotCommitted", "commitment", details.Commitment.ID(), "acceptedBlocks count", details.AcceptedBlocks.Size(), "accepted transactions", len(details.Mutations))
}).Unhook,

events.Notarization.LatestCommitmentUpdated.Hook(func(commitment *model.Commitment) {
instance.LogTrace("NotarizationManager.LatestCommitmentUpdated", "commitment", commitment.ID())
instance.LogDebug("NotarizationManager.LatestCommitmentUpdated", "commitment", commitment.ID())
}).Unhook,

events.BlockGadget.BlockPreAccepted.Hook(func(block *blocks.Block) {
Expand All @@ -209,7 +209,7 @@ func attachEngineLogs(instance *engine.Engine) func() {
}).Unhook,

events.SlotGadget.SlotFinalized.Hook(func(slot iotago.SlotIndex) {
instance.LogTrace("SlotGadget.SlotFinalized", "slot", slot)
instance.LogDebug("SlotGadget.SlotFinalized", "slot", slot)
}).Unhook,

events.SeatManager.OnlineCommitteeSeatAdded.Hook(func(seat account.SeatIndex, accountID iotago.AccountID) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/protocol/engine/notarization/slotnotarization/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (m *Manager) isCommittable(slot iotago.SlotIndex, acceptedBlockSlot iotago.
}

func (m *Manager) createCommitment(slot iotago.SlotIndex) (*model.Commitment, error) {
m.LogTrace("Trying to create commitment for slot", "slot", slot)
m.LogDebug("Trying to create commitment for slot", "slot", slot)
m.commitmentMutex.Lock()
defer m.commitmentMutex.Unlock()

Expand Down Expand Up @@ -260,7 +260,7 @@ func (m *Manager) createCommitment(slot iotago.SlotIndex) (*model.Commitment, er
rmc,
)

m.LogTrace("Committing", "commitment", newCommitment, "roots ", roots)
m.LogDebug("Committing", "commitment", newCommitment, "roots ", roots)

newModelCommitment, err := model.CommitmentFromCommitment(newCommitment, apiForSlot, serix.WithValidation())
if err != nil {
Expand Down

0 comments on commit a1b42be

Please sign in to comment.