Добавлено логгирование метрик для системы скинов

This commit is contained in:
ErickSkrauch
2016-12-03 01:57:55 +03:00
parent a0d940f8cd
commit 66c61dc3cd
9 changed files with 59 additions and 28 deletions

View File

@@ -13,9 +13,8 @@ import (
)
func Textures(w http.ResponseWriter, r *http.Request) {
services.Stats.Incr("textures-requests", 1)
services.Logger.IncCounter("textures.request", 1)
username := tools.ParseUsername(mux.Vars(r)["username"])
log.Println("request textures for username " + username)
rec, err := data.FindSkinByUsername(username)
if (err != nil || rec.SkinId == 0) {