aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/geth/main.go')
-rw-r--r--cmd/geth/main.go7
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