Skip to content

Commit 4e1425f

Browse files
committed
cmd/maddy: Remove debug directive hack for command line argument
1 parent 290c6d0 commit 4e1425f

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

cmd/maddy/main.go

-13
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,6 @@ func main() {
7575
os.Exit(1)
7676
}
7777

78-
if log.DefaultLogger.Debug {
79-
// Insert 'debug' directive so other config blocks will inherit it.
80-
skipInsert := false
81-
for _, node := range cfg {
82-
if node.Name == "debug" {
83-
skipInsert = true
84-
}
85-
}
86-
if !skipInsert {
87-
cfg = append(cfg, config.Node{Name: "debug"})
88-
}
89-
}
90-
9178
// Make sure all paths we are going to use are absolute
9279
// before we change the working directory.
9380
config.StateDirectory, err = filepath.Abs(config.StateDirectory)

maddy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func Start(cfg []config.Node) error {
3737
globals.Bool("auth_perdomain", false, false, nil)
3838
globals.StringList("auth_domains", false, false, nil, nil)
3939
globals.Custom("log", false, false, defaultLogOutput, logOutput, &log.DefaultLogger.Out)
40-
globals.Bool("debug", false, false, &log.DefaultLogger.Debug)
40+
globals.Bool("debug", false, log.DefaultLogger.Debug, &log.DefaultLogger.Debug)
4141
globals.AllowUnknown()
4242
unmatched, err := globals.Process()
4343
if err != nil {

0 commit comments

Comments
 (0)