diff --git a/docs/docs/CHANGELOG.md b/docs/docs/CHANGELOG.md index a6c4b01e..ee496552 100644 --- a/docs/docs/CHANGELOG.md +++ b/docs/docs/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Demote "explicit deny" logs from the Info log level to Info minus one. To get those logs back, set `SLOG_LEVEL=INFO-1` in your environment variables. + ## v1.24.0 [pre1]: Y'shtola Rhul diff --git a/lib/anubis.go b/lib/anubis.go index feff53a3..0fcdebb3 100644 --- a/lib/anubis.go +++ b/lib/anubis.go @@ -304,7 +304,7 @@ func (s *Server) checkRules(w http.ResponseWriter, r *http.Request, cr policy.Ch return true case config.RuleDeny: s.ClearCookie(w, CookieOpts{Path: cookiePath, Host: r.Host}) - lg.Info("explicit deny") + lg.Log(r.Context(), slog.LevelInfo-slog.Level(1), "explicit deny") if rule == nil { lg.Error("rule is nil, cannot calculate checksum") s.respondWithError(w, r, fmt.Sprintf("%s \"maybeReverseProxy.RuleDeny\"", localizer.T("internal_server_error")), makeCode(ErrActualAnubisBug))