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"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/internal/debug"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/holiman/uint256"
|
||||
"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
|
||||
// to verify expected outputs
|
||||
func logTest(ctx *cli.Context) error {
|
||||
// clear field padding map
|
||||
debug.ResetLogging()
|
||||
|
||||
{ // big.Int
|
||||
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"
|
||||
|
@ -168,22 +168,12 @@ var Flags = []cli.Flag{
|
||||
}
|
||||
|
||||
var (
|
||||
glogger *log.GlogHandler
|
||||
logOutputFile io.WriteCloser
|
||||
defaultTerminalHandler *log.TerminalHandler
|
||||
glogger *log.GlogHandler
|
||||
logOutputFile io.WriteCloser
|
||||
)
|
||||
|
||||
func init() {
|
||||
defaultTerminalHandler = 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()
|
||||
}
|
||||
glogger = log.NewGlogHandler(log.NewTerminalHandler(os.Stderr, false))
|
||||
}
|
||||
|
||||
// Setup initializes profiling and logging based on the CLI flags.
|
||||
|
Loading…
Reference in New Issue
Block a user