aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/consolecmd.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-22 20:10:07 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-23 18:16:44 +0800
commitd4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851 (patch)
tree17c93170551d3eeabe2935de1765f157007f0dc2 /cmd/geth/consolecmd.go
parent47af53f9aaf9aa7b12cd976eb150ccf3d64da6fd (diff)
downloaddexon-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar
dexon-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.gz
dexon-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.bz2
dexon-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.lz
dexon-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.xz
dexon-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.zst
dexon-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.zip
all: blidly swap out glog to our log15, logs need rework
Diffstat (limited to 'cmd/geth/consolecmd.go')
-rw-r--r--cmd/geth/consolecmd.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/cmd/geth/consolecmd.go b/cmd/geth/consolecmd.go
index b1c435e00..4009e3e33 100644
--- a/cmd/geth/consolecmd.go
+++ b/cmd/geth/consolecmd.go
@@ -17,12 +17,14 @@
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"
@@ -78,7 +80,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 {
- utils.Fatalf("Failed to attach to the inproc geth: %v", err)
+ log.Crit(fmt.Sprintf("Failed to attach to the inproc geth: %v", err))
}
config := console.Config{
DataDir: node.DataDir(),
@@ -88,7 +90,7 @@ func localConsole(ctx *cli.Context) error {
}
console, err := console.New(config)
if err != nil {
- utils.Fatalf("Failed to start the JavaScript console: %v", err)
+ log.Crit(fmt.Sprintf("Failed to start the JavaScript console: %v", err))
}
defer console.Stop(false)
@@ -110,7 +112,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 {
- utils.Fatalf("Unable to attach to remote geth: %v", err)
+ log.Crit(fmt.Sprintf("Unable to attach to remote geth: %v", err))
}
config := console.Config{
DataDir: utils.MakeDataDir(ctx),
@@ -120,7 +122,7 @@ func remoteConsole(ctx *cli.Context) error {
}
console, err := console.New(config)
if err != nil {
- utils.Fatalf("Failed to start the JavaScript console: %v", err)
+ log.Crit(fmt.Sprintf("Failed to start the JavaScript console: %v", err))
}
defer console.Stop(false)
@@ -162,7 +164,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 {
- utils.Fatalf("Failed to attach to the inproc geth: %v", err)
+ log.Crit(fmt.Sprintf("Failed to attach to the inproc geth: %v", err))
}
config := console.Config{
DataDir: node.DataDir(),
@@ -172,14 +174,14 @@ func ephemeralConsole(ctx *cli.Context) error {
}
console, err := console.New(config)
if err != nil {
- utils.Fatalf("Failed to start the JavaScript console: %v", err)
+ log.Crit(fmt.Sprintf("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 {
- utils.Fatalf("Failed to execute %s: %v", file, err)
+ log.Crit(fmt.Sprintf("Failed to execute %s: %v", file, err))
}
}
// Wait for pending callbacks, but stop for Ctrl-C.