logging: Implement log_append handler (#6066)

* logging: Implement `extra_log` handler

* Rename to `log_append`

* Rename `skip_log` to `log_skip`

---------

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
This commit is contained in:
Francis Lavoie
2024-03-05 19:03:59 -05:00
committed by GitHub
parent 2a78c9c5e4
commit 0d44e3ecba
9 changed files with 239 additions and 12 deletions

View File

@ -715,7 +715,7 @@ func (s *Server) logRequest(
repl *caddy.Replacer, bodyReader *lengthReader, shouldLogCredentials bool,
) {
// this request may be flagged as omitted from the logs
if skipLog, ok := GetVar(r.Context(), SkipLogVar).(bool); ok && skipLog {
if skip, ok := GetVar(r.Context(), LogSkipVar).(bool); ok && skip {
return
}