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

@@ -5,14 +5,12 @@ import (
"time"
"git.loafle.net/commons_go/config"
"git.loafle.net/commons_go/logging"
rp "git.loafle.net/commons_go/redis_pool"
)
func NewPool(ctx context.Context) rp.Pool {
h := &poolHandlers{
ctx: ctx,
logger: logging.WithContext(ctx),
ctx: ctx,
}
h.cfg = config.Sub("redis")
h.MaxIdle = h.cfg.GetInt("pool.MaxIdle")

View File

@@ -8,14 +8,12 @@ import (
"git.loafle.net/commons_go/config"
rp "git.loafle.net/commons_go/redis_pool"
"go.uber.org/zap"
)
type poolHandlers struct {
rp.PoolHandlers
ctx context.Context
logger *zap.Logger
cfg config.Configurator
ctx context.Context
cfg config.Configurator
}
func (h *poolHandlers) Dial() (redis.Conn, error) {