lower log level for frequent messages

This commit is contained in:
Pay Giesselmann
2023-06-20 15:47:38 +02:00
parent d0516f12b0
commit a9544f5609
8 changed files with 29 additions and 29 deletions

View File

@@ -364,7 +364,7 @@ func (auth *Authentication) Login(
return
}
log.Warn("login failed: no authenticator applied")
log.Debugf("login failed: no authenticator applied")
onfailure(rw, r, err)
})
}
@@ -380,7 +380,7 @@ func (auth *Authentication) Auth(
for _, authenticator := range auth.authenticators {
user, err := authenticator.Auth(rw, r)
if err != nil {
log.Warnf("authentication failed: %s", err.Error())
log.Infof("authentication failed: %s", err.Error())
http.Error(rw, err.Error(), http.StatusUnauthorized)
return
}
@@ -393,7 +393,7 @@ func (auth *Authentication) Auth(
return
}
log.Warnf("authentication failed: %s", "no authenticator applied")
log.Debugf("authentication failed: %s", "no authenticator applied")
// http.Error(rw, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
onfailure(rw, r, errors.New("unauthorized (login first or use a token)"))
})