func TraceCrashStack() { if x := recover(); x != nil { logger.Error("====ERROR:%v====\n", x) for i := 0; i < 10; i++ { _fn, _file, _line, ok := runtime.Caller(i) if ok { logger.Error("[%v][%s:%v]\n", runtime.FuncForPC(_fn).Name(), _file, _line) } } } }
func (this *Redis) Do(command string, args ...interface{}) interface{} { conn := this.pool.Get() defer conn.Close() reply, err := conn.Do(command, args...) if err != nil { logger.Error("Redis command error :%v\n", err) return nil } return reply }