Skip to content

Commit

Permalink
Revert "cmd/geth: rename --vmodule to --log.vmodule (ethereum#27071)"
Browse files Browse the repository at this point in the history
This reverts commit 518de7f.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent 3ee47f8 commit c342730
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions internal/debug/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,10 @@ var (
Value: 3,
Category: flags.LoggingCategory,
}
logVmoduleFlag = &cli.StringFlag{
Name: "log.vmodule",
Usage: "Per-module verbosity: comma-separated list of <pattern>=<level> (e.g. eth/*=5,p2p=4)",
Value: "",
Category: flags.LoggingCategory,
}
vmoduleFlag = &cli.StringFlag{
Name: "vmodule",
Usage: "Per-module verbosity: comma-separated list of <pattern>=<level> (e.g. eth/*=5,p2p=4)",
Value: "",
Hidden: true,
Category: flags.LoggingCategory,
}
logjsonFlag = &cli.BoolFlag{
Expand Down Expand Up @@ -156,7 +149,6 @@ var (
// Flags holds all command-line flags required for debugging.
var Flags = []cli.Flag{
verbosityFlag,
logVmoduleFlag,
vmoduleFlag,
backtraceAtFlag,
debugFlag,
Expand Down Expand Up @@ -260,14 +252,7 @@ func Setup(ctx *cli.Context) error {
// logging
verbosity := ctx.Int(verbosityFlag.Name)
glogger.Verbosity(log.Lvl(verbosity))
vmodule := ctx.String(logVmoduleFlag.Name)
if vmodule == "" {
// Retain backwards compatibility with `--vmodule` flag if `--log.vmodule` not set
vmodule = ctx.String(vmoduleFlag.Name)
if vmodule != "" {
defer log.Warn("The flag '--vmodule' is deprecated, please use '--log.vmodule' instead")
}
}
vmodule := ctx.String(vmoduleFlag.Name)
glogger.Vmodule(vmodule)

debug := ctx.Bool(debugFlag.Name)
Expand Down

0 comments on commit c342730

Please sign in to comment.