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

batch service: improve logging #1574

Merged
merged 1 commit into from
Apr 16, 2021
Merged
Changes from all commits
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 pkg/postage/batchservice/batchservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (svc *batchService) Create(id, owner []byte, normalisedBalance *big.Int, de
return fmt.Errorf("put: %w", err)
}

svc.logger.Debugf("created batch id %s", hex.EncodeToString(b.ID))
svc.logger.Debugf("batch service: created batch id %s", hex.EncodeToString(b.ID))
return nil
}

Expand All @@ -64,7 +64,7 @@ func (svc *batchService) TopUp(id []byte, normalisedBalance *big.Int) error {
return fmt.Errorf("put: %w", err)
}

svc.logger.Debugf("topped up batch id %s from %v to %v", hex.EncodeToString(b.ID), b.Value, normalisedBalance)
svc.logger.Debugf("batch service: topped up batch id %s from %v to %v", hex.EncodeToString(b.ID), b.Value, normalisedBalance)
return nil
}

Expand All @@ -80,7 +80,7 @@ func (svc *batchService) UpdateDepth(id []byte, depth uint8, normalisedBalance *
return fmt.Errorf("put: %w", err)
}

svc.logger.Debugf("updated depth of batch id %s from %d to %d", hex.EncodeToString(b.ID), b.Depth, depth)
svc.logger.Debugf("batch service: updated depth of batch id %s from %d to %d", hex.EncodeToString(b.ID), b.Depth, depth)
return nil
}

Expand All @@ -93,7 +93,7 @@ func (svc *batchService) UpdatePrice(price *big.Int) error {
return fmt.Errorf("put chain state: %w", err)
}

svc.logger.Debugf("updated chain price to %s", price)
svc.logger.Debugf("batch service: updated chain price to %s", price)
return nil
}

Expand All @@ -107,6 +107,6 @@ func (svc *batchService) UpdateBlockNumber(blockNumber uint64) error {
return fmt.Errorf("put chain state: %w", err)
}

svc.logger.Debugf("updated block height to %d", blockNumber)
svc.logger.Debugf("batch service: updated block height to %d", blockNumber)
return nil
}