Commit 8e903140 authored by hujiebin's avatar hujiebin

feat:继续搞日志

parent 9c2594c4
...@@ -65,7 +65,7 @@ func GetUserRoomVisit(userId uint64) (map[string]int64, error) { ...@@ -65,7 +65,7 @@ func GetUserRoomVisit(userId uint64) (map[string]int64, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
mylogrus.MyLog.Infof("GetUserRoomVisit, ZRangeWithScores %s, return %v", key, ret) //mylogrus.MyLog.Infof("GetUserRoomVisit, ZRangeWithScores %s, return %v", key, ret)
result := make(map[string]int64, 0) result := make(map[string]int64, 0)
for _, i := range ret { for _, i := range ret {
......
...@@ -875,7 +875,7 @@ var micGroupNumCache = gcache.New(10000).LRU().Build() ...@@ -875,7 +875,7 @@ var micGroupNumCache = gcache.New(10000).LRU().Build()
func GetMicHasInGroupNum(model *domain.Model) (map[string]int64, error) { func GetMicHasInGroupNum(model *domain.Model) (map[string]int64, error) {
// get from cache // get from cache
if data, err := micGroupNumCache.Get(micGroupNumKey); err == nil { if data, err := micGroupNumCache.Get(micGroupNumKey); err == nil {
model.Log.Infof("GetMicHasInGroupNum cache hit:%v", data) //model.Log.Infof("GetMicHasInGroupNum cache hit:%v", data)
// 正服才缓存 // 正服才缓存
if config.AppIsRelease() { if config.AppIsRelease() {
return data.(map[string]int64), nil return data.(map[string]int64), nil
......
...@@ -98,7 +98,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -98,7 +98,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
return myContext, err return myContext, err
} }
gameGroups := group_m.GetGameGroupsMap(model) gameGroups := group_m.GetGameGroupsMap(model)
model.Log.Infof("GetPopularGroups: page size = %d, page index = %d, banMap %v, hidenMap %v,cost:%v", pageSize, pageIndex, bannedGroups, hiddenGroups, time.Now().Sub(start)) //model.Log.Infof("GetPopularGroups: page size = %d, page index = %d, banMap %v, hidenMap %v,cost:%v", pageSize, pageIndex, bannedGroups, hiddenGroups, time.Now().Sub(start))
hotGroupList := make([]group_m.GroupInfo, 0) hotGroupList := make([]group_m.GroupInfo, 0)
...@@ -129,7 +129,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -129,7 +129,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
} }
groupIds = append(groupIds, i) groupIds = append(groupIds, i)
} }
model.Log.Infof("GetPopularGroups, micGroupNum: %v, banned %d, hidden %d,cost:%v", micGroupNum, banCount, hiddenCount, time.Now().Sub(start)) //model.Log.Infof("GetPopularGroups, micGroupNum: %v, banned %d, hidden %d,cost:%v", micGroupNum, banCount, hiddenCount, time.Now().Sub(start))
// 3. 处理置顶群 // 3. 处理置顶群
topGroupIds, err := getTopGroups(model, bannedGroups, hiddenGroups, area) topGroupIds, err := getTopGroups(model, bannedGroups, hiddenGroups, area)
...@@ -857,7 +857,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -857,7 +857,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) {
if err != nil { if err != nil {
return myContext, err return myContext, err
} }
model.Log.Infof("GetGroupVisitors %s: memberNum = %d, user size = %d", groupId, len(rows), len(userIds)) //model.Log.Infof("GetGroupVisitors %s: memberNum = %d, user size = %d", groupId, len(rows), len(userIds))
result := GetGroupVisitorsRsp{Total: uint(len(userIds))} result := GetGroupVisitorsRsp{Total: uint(len(userIds))}
...@@ -879,7 +879,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -879,7 +879,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) {
result.Online++ result.Online++
} }
} }
model.Log.Infof("GetGroupVisitors %s: statusMap size = %d, onLine = %d", groupId, len(statusMap), result.Online) //model.Log.Infof("GetGroupVisitors %s: statusMap size = %d, onLine = %d", groupId, len(statusMap), result.Online)
roles, _, err := group_m.GetRolesInGroup(model, groupId) roles, _, err := group_m.GetRolesInGroup(model, groupId)
if err != nil { if err != nil {
...@@ -900,7 +900,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -900,7 +900,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) {
return myContext, err return myContext, err
} }
model.Log.Infof("GetGroupVisitors %s, users %v, roles: %v, nobles: %v, vips: %v", groupId, userIds, roles, nobleLevels, vips) //model.Log.Infof("GetGroupVisitors %s, users %v, roles: %v, nobles: %v, vips: %v", groupId, userIds, roles, nobleLevels, vips)
roomUsers, err := group_m.RoomLivingExistsUserId(groupId) roomUsers, err := group_m.RoomLivingExistsUserId(groupId)
if err != nil { if err != nil {
...@@ -955,7 +955,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -955,7 +955,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) {
return false return false
}) })
model.Log.Infof("GetGroupVisitors %s, sorted users: %v", groupId, userIds) //model.Log.Infof("GetGroupVisitors %s, sorted users: %v", groupId, userIds)
endPos := pageSize * pageIndex endPos := pageSize * pageIndex
if endPos > len(userIds) { if endPos > len(userIds) {
...@@ -1248,7 +1248,7 @@ func GetGroupByCountry(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -1248,7 +1248,7 @@ func GetGroupByCountry(c *gin.Context) (*mycontext.MyContext, error) {
return myContext, err return myContext, err
} }
model.Log.Infof("GetGroupByCountry: page size = %d, page index = %d, banMap %v", pageSize, pageIndex, bannedGroups) //model.Log.Infof("GetGroupByCountry: page size = %d, page index = %d, banMap %v", pageSize, pageIndex, bannedGroups)
beginTime := time.Now() beginTime := time.Now()
groups, banCount, visitCount, err := getCandidatesByCountry(model, bannedGroups, countryShortName) groups, banCount, visitCount, err := getCandidatesByCountry(model, bannedGroups, countryShortName)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment