aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/server.go')
-rw-r--r--rpc/server.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/rpc/server.go b/rpc/server.go
index 996c63700..4f9ce541e 100644
--- a/rpc/server.go
+++ b/rpc/server.go
@@ -22,8 +22,8 @@ import (
"runtime"
"sync/atomic"
- "github.com/ethereum/go-ethereum/logger"
- "github.com/ethereum/go-ethereum/logger/glog"
+ "github.com/ethereum/go-ethereum/log"
+
"golang.org/x/net/context"
"gopkg.in/fatih/set.v0"
)
@@ -149,7 +149,7 @@ func (s *Server) serveRequest(codec ServerCodec, singleShot bool, options CodecO
const size = 64 << 10
buf := make([]byte, size)
buf = buf[:runtime.Stack(buf, false)]
- glog.Errorln(string(buf))
+ log.Error(fmt.Sprint(string(buf)))
}
s.codecsMu.Lock()
@@ -180,7 +180,7 @@ func (s *Server) serveRequest(codec ServerCodec, singleShot bool, options CodecO
for atomic.LoadInt32(&s.run) == 1 {
reqs, batch, err := s.readRequest(codec)
if err != nil {
- glog.V(logger.Debug).Infof("read error %v\n", err)
+ log.Debug(fmt.Sprintf("read error %v\n", err))
codec.Write(codec.CreateErrorResponse(nil, err))
return nil
}
@@ -236,7 +236,7 @@ func (s *Server) ServeSingleRequest(codec ServerCodec, options CodecOption) {
// close all codecs which will cancel pending requests/subscriptions.
func (s *Server) Stop() {
if atomic.CompareAndSwapInt32(&s.run, 1, 0) {
- glog.V(logger.Debug).Infoln("RPC Server shutdown initiatied")
+ log.Debug(fmt.Sprint("RPC Server shutdown initiatied"))
s.codecsMu.Lock()
defer s.codecsMu.Unlock()
s.codecs.Each(func(c interface{}) bool {
@@ -341,7 +341,7 @@ func (s *Server) exec(ctx context.Context, codec ServerCodec, req *serverRequest
}
if err := codec.Write(response); err != nil {
- glog.V(logger.Error).Infof("%v\n", err)
+ log.Error(fmt.Sprintf("%v\n", err))
codec.Close()
}
@@ -368,7 +368,7 @@ func (s *Server) execBatch(ctx context.Context, codec ServerCodec, requests []*s
}
if err := codec.Write(responses); err != nil {
- glog.V(logger.Error).Infof("%v\n", err)
+ log.Error(fmt.Sprintf("%v\n", err))
codec.Close()
}
graph'>* Convert audio from USE_GMAKE to USES=gmakebapt2013-08-311-8/+2 * - Remove MAKE_JOBS_SAFE variableak2013-08-151-1/+0 * - Convert USE_GETTEXT to USES (part 3)ak2013-04-251-1/+1 * libogg.so.8: Bump PORTREVISION for ports that depend on libogg,naddy2012-07-201-2/+2 * - Update MASTER_SITESsylvio2012-06-065-57/+61 * Convert to new options framework, while here disable LAME by default to allowbapt2012-06-011-9/+8 * - update png to 1.5.10dinoex2012-06-011-1/+1