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:
Manu NALEPA
2025-11-28 15:34:02 +01:00
committed by GitHub
parent f97622b054
commit 2a23dc7f4a
11 changed files with 27 additions and 12 deletions

View File

@@ -2,7 +2,10 @@ load("@prysm//tools/go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["options.go"],
srcs = [
"log.go",
"options.go",
],
importpath = "github.com/OffchainLabs/prysm/v7/cmd/beacon-chain/genesis",
visibility = ["//visibility:public"],
deps = [

View File

@@ -0,0 +1,5 @@
package genesis
import "github.com/sirupsen/logrus"
var log = logrus.WithField("prefix", "genesis")

View File

@@ -5,7 +5,6 @@ import (
"github.com/OffchainLabs/prysm/v7/cmd/beacon-chain/sync/checkpoint"
"github.com/OffchainLabs/prysm/v7/genesis"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)