aboutsummaryrefslogtreecommitdiffstats
path: root/websocket/server.go
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 /websocket/server.go
parentfd9da72536b73351bbcdc1e9dbbbb8c0e4bfb21b (diff)
downloadgo-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.tar.gz
go-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.tar.zst
go-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.zip
ethlog => logger
Diffstat (limited to 'websocket/server.go')
-rw-r--r--websocket/server.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/websocket/server.go b/websocket/server.go
index 1b4c00433..5fd923a0c 100644
--- a/websocket/server.go
+++ b/websocket/server.go
@@ -3,12 +3,12 @@ package websocket
import (
"net/http"
- "github.com/ethereum/go-ethereum/ethlog"
+ "github.com/ethereum/go-ethereum/logger"
ws "code.google.com/p/go.net/websocket"
)
-var logger = ethlog.NewLogger("WS")
+var wslogger = logger.NewLogger("WS")
// Chat server.
type Server struct {
@@ -68,10 +68,10 @@ func (s *Server) Err(err error) {
}
func (s *Server) servHTTP() {
- logger.Debugln("Serving http", s.httpServ)
+ wslogger.Debugln("Serving http", s.httpServ)
err := http.ListenAndServe(s.httpServ, nil)
- logger.Warnln(err)
+ wslogger.Warnln(err)
}
func (s *Server) MessageFunc(f MsgFunc) {
@@ -81,7 +81,7 @@ func (s *Server) MessageFunc(f MsgFunc) {
// Listen and serve.
// It serves client connection and broadcast request.
func (s *Server) Listen() {
- logger.Debugln("Listening server...")
+ wslogger.Debugln("Listening server...")
// ws handler
onConnected := func(ws *ws.Conn) {
@@ -102,7 +102,7 @@ func (s *Server) Listen() {
s := ws.Server{Handler: ws.Handler(onConnected)}
s.ServeHTTP(w, req)
})
- logger.Debugln("Created handler")
+ wslogger.Debugln("Created handler")
go s.servHTTP()
@@ -118,7 +118,7 @@ func (s *Server) Listen() {
delete(s.clients, c.id)
case err := <-s.errCh:
- logger.Debugln("Error:", err.Error())
+ wslogger.Debugln("Error:", err.Error())
case <-s.doneCh:
return