aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-31 19:56:05 +0800
committerobscuren <geffobscura@gmail.com>2014-10-31 19:56:05 +0800
commitb1c247231b11f313ca0eedff75ea563926d23f68 (patch)
tree48b2136cb65e69cb79ffac80f3cc3fdf9dba1cc8 /rpc
parentfd9da72536b73351bbcdc1e9dbbbb8c0e4bfb21b (diff)
downloaddexon-b1c247231b11f313ca0eedff75ea563926d23f68.tar
dexon-b1c247231b11f313ca0eedff75ea563926d23f68.tar.gz
dexon-b1c247231b11f313ca0eedff75ea563926d23f68.tar.bz2
dexon-b1c247231b11f313ca0eedff75ea563926d23f68.tar.lz
dexon-b1c247231b11f313ca0eedff75ea563926d23f68.tar.xz
dexon-b1c247231b11f313ca0eedff75ea563926d23f68.tar.zst
dexon-b1c247231b11f313ca0eedff75ea563926d23f68.zip
ethlog => logger
Diffstat (limited to 'rpc')
-rw-r--r--rpc/packages.go2
-rw-r--r--rpc/server.go12
2 files changed, 7 insertions, 7 deletions
diff --git a/rpc/packages.go b/rpc/packages.go
index 07d3ddc9a..31500867c 100644
--- a/rpc/packages.go
+++ b/rpc/packages.go
@@ -208,7 +208,7 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageArgs, reply *string) error {
i, _ := new(big.Int).SetString(args.Key, 10)
hx = ethutil.Bytes2Hex(i.Bytes())
}
- logger.Debugf("GetStorageAt(%s, %s)\n", args.Address, hx)
+ jsonlogger.Debugf("GetStorageAt(%s, %s)\n", args.Address, hx)
value := state.Storage(ethutil.Hex2Bytes(hx))
*reply = NewSuccessRes(GetStorageAtRes{Address: args.Address, Key: args.Key, Value: value.Str()})
return nil
diff --git a/rpc/server.go b/rpc/server.go
index ce53266f0..20f75ce67 100644
--- a/rpc/server.go
+++ b/rpc/server.go
@@ -6,11 +6,11 @@ import (
"net/rpc"
"net/rpc/jsonrpc"
- "github.com/ethereum/go-ethereum/ethlog"
"github.com/ethereum/go-ethereum/ethpipe"
+ "github.com/ethereum/go-ethereum/logger"
)
-var logger = ethlog.NewLogger("JSON")
+var jsonlogger = logger.NewLogger("JSON")
type JsonRpcServer struct {
quit chan bool
@@ -28,7 +28,7 @@ out:
}
}
- logger.Infoln("Shutdown JSON-RPC server")
+ jsonlogger.Infoln("Shutdown JSON-RPC server")
}
func (s *JsonRpcServer) Stop() {
@@ -36,7 +36,7 @@ func (s *JsonRpcServer) Stop() {
}
func (s *JsonRpcServer) Start() {
- logger.Infoln("Starting JSON-RPC server")
+ jsonlogger.Infoln("Starting JSON-RPC server")
go s.exitHandler()
rpc.Register(&EthereumApi{pipe: s.pipe})
rpc.HandleHTTP()
@@ -44,10 +44,10 @@ func (s *JsonRpcServer) Start() {
for {
conn, err := s.listener.Accept()
if err != nil {
- logger.Infoln("Error starting JSON-RPC:", err)
+ jsonlogger.Infoln("Error starting JSON-RPC:", err)
break
}
- logger.Debugln("Incoming request.")
+ jsonlogger.Debugln("Incoming request.")
go jsonrpc.ServeConn(conn)
}
}