diff options
Diffstat (limited to 'cmd/geth/main.go')
-rw-r--r-- | cmd/geth/main.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 52308948f..e42aab30a 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -199,7 +199,12 @@ func init() { app.Before = func(ctx *cli.Context) error { runtime.GOMAXPROCS(runtime.NumCPU()) - if err := debug.Setup(ctx); err != nil { + + logdir := "" + if ctx.GlobalBool(utils.DashboardEnabledFlag.Name) { + logdir = (&node.Config{DataDir: utils.MakeDataDir(ctx)}).ResolvePath("logs") + } + if err := debug.Setup(ctx, logdir); err != nil { return err } // Cap the cache allowance and tune the garbage collector |