From a05ac427536b4c9f572ad75647a44106d2c1f162 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Mon, 4 Nov 2013 09:55:31 +0200 Subject: [PATCH] Use glog. --- v2/redis.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/v2/redis.go b/v2/redis.go index f56c184..6db08aa 100644 --- a/v2/redis.go +++ b/v2/redis.go @@ -1,17 +1,12 @@ package redis import ( - "log" "net" - "os" "time" + + "github.com/golang/glog" ) -// Package logger. -var Logger = log.New(os.Stdout, "redis: ", log.Ldate|log.Ltime) - -//------------------------------------------------------------------------------ - type baseClient struct { connPool pool @@ -82,13 +77,13 @@ func (c *baseClient) freeConn(cn *conn, err error) { func (c *baseClient) removeConn(cn *conn) { if err := c.connPool.Remove(cn); err != nil { - Logger.Printf("connPool.Remove error: %v", err) + glog.Errorf("pool.Remove failed: %s", err) } } func (c *baseClient) putConn(cn *conn) { if err := c.connPool.Put(cn); err != nil { - Logger.Printf("connPool.Add error: %v", err) + glog.Errorf("pool.Put failed: %s", err) } }