cmd/geth, internal/debug: get rid of by-default log config (#28801)
This commit is contained in:
parent
065f82a8cc
commit
43ba7d65a8
@ -26,7 +26,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/internal/debug"
|
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/ethereum/go-ethereum/log"
|
||||||
"github.com/holiman/uint256"
|
"github.com/holiman/uint256"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
@ -51,9 +50,6 @@ func (c customQuotedStringer) String() string {
|
|||||||
// logTest is an entry point which spits out some logs. This is used by testing
|
// logTest is an entry point which spits out some logs. This is used by testing
|
||||||
// to verify expected outputs
|
// to verify expected outputs
|
||||||
func logTest(ctx *cli.Context) error {
|
func logTest(ctx *cli.Context) error {
|
||||||
// clear field padding map
|
|
||||||
debug.ResetLogging()
|
|
||||||
|
|
||||||
{ // big.Int
|
{ // big.Int
|
||||||
ba, _ := new(big.Int).SetString("111222333444555678999", 10) // "111,222,333,444,555,678,999"
|
ba, _ := new(big.Int).SetString("111222333444555678999", 10) // "111,222,333,444,555,678,999"
|
||||||
bb, _ := new(big.Int).SetString("-111222333444555678999", 10) // "-111,222,333,444,555,678,999"
|
bb, _ := new(big.Int).SetString("-111222333444555678999", 10) // "-111,222,333,444,555,678,999"
|
||||||
|
@ -170,20 +170,10 @@ var Flags = []cli.Flag{
|
|||||||
var (
|
var (
|
||||||
glogger *log.GlogHandler
|
glogger *log.GlogHandler
|
||||||
logOutputFile io.WriteCloser
|
logOutputFile io.WriteCloser
|
||||||
defaultTerminalHandler *log.TerminalHandler
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
defaultTerminalHandler = log.NewTerminalHandler(os.Stderr, false)
|
glogger = log.NewGlogHandler(log.NewTerminalHandler(os.Stderr, false))
|
||||||
glogger = log.NewGlogHandler(defaultTerminalHandler)
|
|
||||||
glogger.Verbosity(log.LvlInfo)
|
|
||||||
log.SetDefault(log.NewLogger(glogger))
|
|
||||||
}
|
|
||||||
|
|
||||||
func ResetLogging() {
|
|
||||||
if defaultTerminalHandler != nil {
|
|
||||||
defaultTerminalHandler.ResetFieldPadding()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup initializes profiling and logging based on the CLI flags.
|
// Setup initializes profiling and logging based on the CLI flags.
|
||||||
|
Loading…
Reference in New Issue
Block a user