cmd/geth: decent error message if metrics are disabled

pull/1360/head
Péter Szilágyi 9 years ago committed by Jeffrey Wilcke
parent 01fe972113
commit 5f3792c2a7
  1. 2
      cmd/geth/monitorcmd.go
  2. 1
      core/chain_manager.go

@ -79,7 +79,7 @@ func monitor(ctx *cli.Context) {
if len(list) > 0 { if len(list) > 0 {
utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - ")) utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - "))
} else { } else {
utils.Fatalf("No metrics specified.\n\nNo metrics collected (--metrics)\n") utils.Fatalf("No metrics collected by geth (--%s).\n", utils.MetricsEnabledFlag.Name)
} }
} }
sort.Strings(monitored) sort.Strings(monitored)

@ -23,7 +23,6 @@ import (
"github.com/ethereum/go-ethereum/pow" "github.com/ethereum/go-ethereum/pow"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/hashicorp/golang-lru" "github.com/hashicorp/golang-lru"
"github.com/rcrowley/go-metrics"
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
) )

Loading…
Cancel
Save