mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 11:57:18 +00:00
Add Geth Logging (#5474)
* add new logging * Update beacon-chain/main.go * Merge refs/heads/master into gethLogging * Merge refs/heads/master into gethLogging * Merge refs/heads/master into gethLogging * Merge refs/heads/master into gethLogging * fix image * Merge refs/heads/master into gethLogging
This commit is contained in:
parent
c0ca567175
commit
b0af12d5dc
@ -20,6 +20,7 @@ go_library(
|
||||
"//shared/featureconfig:go_default_library",
|
||||
"//shared/logutil:go_default_library",
|
||||
"//shared/version:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//log:go_default_library",
|
||||
"@com_github_ipfs_go_log//:go_default_library",
|
||||
"@com_github_joonix_log//:go_default_library",
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
@ -57,6 +58,7 @@ go_image(
|
||||
"//shared/featureconfig:go_default_library",
|
||||
"//shared/logutil:go_default_library",
|
||||
"//shared/version:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//log:go_default_library",
|
||||
"@com_github_ipfs_go_log//:go_default_library",
|
||||
"@com_github_joonix_log//:go_default_library",
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"runtime"
|
||||
runtimeDebug "runtime/debug"
|
||||
|
||||
gethlog "github.com/ethereum/go-ethereum/log"
|
||||
golog "github.com/ipfs/go-log"
|
||||
joonix "github.com/joonix/log"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/flags"
|
||||
@ -167,7 +168,12 @@ func startNode(ctx *cli.Context) error {
|
||||
}
|
||||
logrus.SetLevel(level)
|
||||
if level == logrus.TraceLevel {
|
||||
// libp2p specific logging.
|
||||
golog.SetAllLoggers(gologging.DEBUG)
|
||||
// Geth specific logging.
|
||||
glogger := gethlog.NewGlogHandler(gethlog.StreamHandler(os.Stderr, gethlog.TerminalFormat(true)))
|
||||
glogger.Verbosity(gethlog.LvlTrace)
|
||||
gethlog.Root().SetHandler(glogger)
|
||||
}
|
||||
|
||||
beacon, err := node.NewBeaconNode(ctx)
|
||||
|
Loading…
Reference in New Issue
Block a user