Use glog.

This commit is contained in:
Vladimir Mihailenco 2013-11-04 09:55:31 +02:00
parent fe2e33a4f2
commit a05ac42753
1 changed files with 4 additions and 9 deletions

View File

@ -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)
}
}