diff options
Diffstat (limited to 'cmd/geth/consolecmd.go')
-rw-r--r-- | cmd/geth/consolecmd.go | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/cmd/geth/consolecmd.go b/cmd/geth/consolecmd.go index 4009e3e33..b1c435e00 100644 --- a/cmd/geth/consolecmd.go +++ b/cmd/geth/consolecmd.go @@ -17,14 +17,12 @@ package main import ( - "fmt" "os" "os/signal" "strings" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/console" - "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" "gopkg.in/urfave/cli.v1" @@ -80,7 +78,7 @@ func localConsole(ctx *cli.Context) error { // Attach to the newly started node and start the JavaScript console client, err := node.Attach() if err != nil { - log.Crit(fmt.Sprintf("Failed to attach to the inproc geth: %v", err)) + utils.Fatalf("Failed to attach to the inproc geth: %v", err) } config := console.Config{ DataDir: node.DataDir(), @@ -90,7 +88,7 @@ func localConsole(ctx *cli.Context) error { } console, err := console.New(config) if err != nil { - log.Crit(fmt.Sprintf("Failed to start the JavaScript console: %v", err)) + utils.Fatalf("Failed to start the JavaScript console: %v", err) } defer console.Stop(false) @@ -112,7 +110,7 @@ func remoteConsole(ctx *cli.Context) error { // Attach to a remotely running geth instance and start the JavaScript console client, err := dialRPC(ctx.Args().First()) if err != nil { - log.Crit(fmt.Sprintf("Unable to attach to remote geth: %v", err)) + utils.Fatalf("Unable to attach to remote geth: %v", err) } config := console.Config{ DataDir: utils.MakeDataDir(ctx), @@ -122,7 +120,7 @@ func remoteConsole(ctx *cli.Context) error { } console, err := console.New(config) if err != nil { - log.Crit(fmt.Sprintf("Failed to start the JavaScript console: %v", err)) + utils.Fatalf("Failed to start the JavaScript console: %v", err) } defer console.Stop(false) @@ -164,7 +162,7 @@ func ephemeralConsole(ctx *cli.Context) error { // Attach to the newly started node and start the JavaScript console client, err := node.Attach() if err != nil { - log.Crit(fmt.Sprintf("Failed to attach to the inproc geth: %v", err)) + utils.Fatalf("Failed to attach to the inproc geth: %v", err) } config := console.Config{ DataDir: node.DataDir(), @@ -174,14 +172,14 @@ func ephemeralConsole(ctx *cli.Context) error { } console, err := console.New(config) if err != nil { - log.Crit(fmt.Sprintf("Failed to start the JavaScript console: %v", err)) + utils.Fatalf("Failed to start the JavaScript console: %v", err) } defer console.Stop(false) // Evaluate each of the specified JavaScript files for _, file := range ctx.Args() { if err = console.Execute(file); err != nil { - log.Crit(fmt.Sprintf("Failed to execute %s: %v", file, err)) + utils.Fatalf("Failed to execute %s: %v", file, err) } } // Wait for pending callbacks, but stop for Ctrl-C. |