diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-02-22 20:10:07 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-02-23 18:16:44 +0800 |
commit | d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851 (patch) | |
tree | 17c93170551d3eeabe2935de1765f157007f0dc2 /cmd/gethrpctest/main.go | |
parent | 47af53f9aaf9aa7b12cd976eb150ccf3d64da6fd (diff) | |
download | go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.gz go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.bz2 go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.lz go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.xz go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.zst go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.zip |
all: blidly swap out glog to our log15, logs need rework
Diffstat (limited to 'cmd/gethrpctest/main.go')
-rw-r--r-- | cmd/gethrpctest/main.go | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/cmd/gethrpctest/main.go b/cmd/gethrpctest/main.go index 9e80ad05d..69a6074e7 100644 --- a/cmd/gethrpctest/main.go +++ b/cmd/gethrpctest/main.go @@ -19,7 +19,7 @@ package main import ( "flag" - "log" + "fmt" "os" "os/signal" @@ -27,7 +27,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/tests" @@ -46,35 +46,34 @@ func main() { flag.Parse() // Enable logging errors, we really do want to see those - glog.SetV(2) - glog.SetToStderr(true) + log.Root().SetHandler(log.LvlFilterHandler(log.LvlError, log.StreamHandler(os.Stderr, log.TerminalFormat()))) // Load the test suite to run the RPC against tests, err := tests.LoadBlockTests(*testFile) if err != nil { - log.Fatalf("Failed to load test suite: %v", err) + log.Crit(fmt.Sprintf("Failed to load test suite: %v", err)) } test, found := tests[*testName] if !found { - log.Fatalf("Requested test (%s) not found within suite", *testName) + log.Crit(fmt.Sprintf("Requested test (%s) not found within suite", *testName)) } stack, err := MakeSystemNode(*testKey, test) if err != nil { - log.Fatalf("Failed to assemble test stack: %v", err) + log.Crit(fmt.Sprintf("Failed to assemble test stack: %v", err)) } if err := stack.Start(); err != nil { - log.Fatalf("Failed to start test node: %v", err) + log.Crit(fmt.Sprintf("Failed to start test node: %v", err)) } defer stack.Stop() - log.Println("Test node started...") + log.Info("Test node started...") // Make sure the tests contained within the suite pass if err := RunTest(stack, test); err != nil { - log.Fatalf("Failed to run the pre-configured test: %v", err) + log.Crit(fmt.Sprintf("Failed to run the pre-configured test: %v", err)) } - log.Println("Initial test suite passed...") + log.Info("Initial test suite passed...") quit := make(chan os.Signal, 1) signal.Notify(quit, os.Interrupt) |