From 84a0420fa301a44ad810017e4f128483b93c2816 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= <peterke@gmail.com>
Date: Fri, 12 Jan 2024 15:02:18 +0200
Subject: [PATCH] cmd/geth, internal/debug: get rid of by-default log config

---
 cmd/geth/logtestcmd_active.go |  4 ----
 internal/debug/flags.go       | 16 +++-------------
 2 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/cmd/geth/logtestcmd_active.go b/cmd/geth/logtestcmd_active.go
index 5cce1ec6abc6..f2a2c5ded54a 100644
--- a/cmd/geth/logtestcmd_active.go
+++ b/cmd/geth/logtestcmd_active.go
@@ -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"
diff --git a/internal/debug/flags.go b/internal/debug/flags.go
index 23e4745e8c80..dac878a7b1ff 100644
--- a/internal/debug/flags.go
+++ b/internal/debug/flags.go
@@ -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.