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:
parent
5a69a61d48
commit
ca45765c46
13 changed files with 22 additions and 24 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue