mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Improve logs (#16075)
**What type of PR is this?** Other **What does this PR do? Why is it needed?** - Added log prefix to the `genesis` package. - Added log prefix to the `params` package. - `WithGenesisValidatorsRoot`: Use camelCase for log field param. - Move `Origin checkpoint found in db` log from WARN to INFO, since it is the expected behaviour. **Other notes for review** Please read commit by commit **Acknowledgements** - [x] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [x] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [x] I have added a description to this PR with sufficient context for reviewers to understand this PR.
This commit is contained in:
@@ -44,7 +44,7 @@ func NewAPIInitializer(beaconNodeHost string) (*APIInitializer, error) {
|
||||
func (dl *APIInitializer) Initialize(ctx context.Context, d db.Database) error {
|
||||
origin, err := d.OriginCheckpointBlockRoot(ctx)
|
||||
if err == nil && origin != params.BeaconConfig().ZeroHash {
|
||||
log.Warnf("Origin checkpoint root %#x found in db, ignoring checkpoint sync flags", origin)
|
||||
log.WithField("root", fmt.Sprintf("%#x", origin)).Info("Origin checkpoint found in the database, ignoring checkpoint sync flags")
|
||||
return nil
|
||||
}
|
||||
if err != nil && !errors.Is(err, db.ErrNotFound) {
|
||||
|
||||
@@ -44,7 +44,7 @@ type FileInitializer struct {
|
||||
func (fi *FileInitializer) Initialize(ctx context.Context, d db.Database) error {
|
||||
origin, err := d.OriginCheckpointBlockRoot(ctx)
|
||||
if err == nil && origin != params.BeaconConfig().ZeroHash {
|
||||
log.Warnf("Origin checkpoint root %#x found in db, ignoring checkpoint sync flags", origin)
|
||||
log.WithField("root", fmt.Sprintf("%#x", origin)).Info("Origin checkpoint found in the database, ignoring checkpoint sync flags")
|
||||
return nil
|
||||
} else {
|
||||
if !errors.Is(err, db.ErrNotFound) {
|
||||
|
||||
Reference in New Issue
Block a user