logging has been changed.

This commit is contained in:
crusader
2017-09-11 12:58:15 +09:00
parent df15f27bca
commit 918775c49b
10 changed files with 47 additions and 70 deletions

View File

@@ -6,10 +6,8 @@ import (
"time"
"git.loafle.net/commons_go/config"
"git.loafle.net/commons_go/logging"
jwt "github.com/dgrijalva/jwt-go"
"github.com/valyala/fasthttp"
"go.uber.org/zap"
ogw "git.loafle.net/overflow/overflow_gateway_websocket"
)
@@ -18,8 +16,7 @@ var ofSigningKey []byte
func newServerHandler(ctx context.Context) ogw.ServerHandler {
h := &serverHandlers{
ctx: ctx,
logger: logging.WithContext(ctx),
ctx: ctx,
}
h.cfg = config.Sub("websocket")
h.HandshakeTimeout = h.cfg.GetDuration("HandshakeTimeout") * time.Second
@@ -32,9 +29,8 @@ func newServerHandler(ctx context.Context) ogw.ServerHandler {
type serverHandlers struct {
ogw.ServerHandlers
ctx context.Context
logger *zap.Logger
cfg config.Configurator
ctx context.Context
cfg config.Configurator
}
func (h *serverHandlers) OnConnection(soc ogw.Socket) {