1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Improve logging messages in ui package

This commit is contained in:
Frédéric Guillot 2018-11-11 11:40:40 -08:00
parent 5a69a61d48
commit ca45765c46
13 changed files with 22 additions and 24 deletions

View file

@ -23,13 +23,13 @@ func (h *handler) checkLogin(w http.ResponseWriter, r *http.Request) {
view.Set("form", authForm)
if err := authForm.Validate(); err != nil {
logger.Error("[Controller:CheckLogin] %v", err)
logger.Error("[UI:CheckLogin] %v", err)
html.OK(w, r, view.Render("login"))
return
}
if err := h.store.CheckPassword(authForm.Username, authForm.Password); err != nil {
logger.Error("[Controller:CheckLogin] [ClientIP=%s] %v", clientIP, err)
logger.Error("[UI:CheckLogin] [ClientIP=%s] %v", clientIP, err)
html.OK(w, r, view.Render("login"))
return
}
@ -40,7 +40,7 @@ func (h *handler) checkLogin(w http.ResponseWriter, r *http.Request) {
return
}
logger.Info("[Controller:CheckLogin] username=%s just logged in", authForm.Username)
logger.Info("[UI:CheckLogin] username=%s just logged in", authForm.Username)
h.store.SetLastLogin(userID)
user, err := h.store.UserByID(userID)