mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-09 04:43:00 +08:00
优化 日志输出
This commit is contained in:
@@ -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 (
|
||||
|
Reference in New Issue
Block a user