优化 日志输出

This commit is contained in:
bjdgyc
2024-03-19 11:22:20 +08:00
parent fc3b39e09f
commit ce89ea680b
8 changed files with 31 additions and 72 deletions

View File

@@ -46,10 +46,11 @@ func LinkAuth(w http.ResponseWriter, r *http.Request) {
cr := ClientRequest{}
err = xml.Unmarshal(body, &cr)
if err != nil {
base.Error(err)
w.WriteHeader(http.StatusBadRequest)
return
}
// fmt.Printf("%+v \n", cr)
base.Trace(fmt.Sprintf("%+v \n", cr))
// setCommonHeader(w)
if cr.Type == "logout" {
// 退出删除session信息
@@ -140,7 +141,7 @@ func LinkAuth(w http.ResponseWriter, r *http.Request) {
Banner: other.Banner, ProfileName: base.Cfg.ProfileName, ProfileHash: profileHash}
w.WriteHeader(http.StatusOK)
tplRequest(tpl_complete, w, rd)
base.Debug("login", cr.Auth.Username, userAgent)
base.Info("login", cr.Auth.Username, userAgent)
}
const (