@@ -0,0 +1,19 @@
+package logging
+
+import (
+	"testing"
+
+	"go.uber.org/zap/zapcore"
+)
+
+func TestQueryFilter(t *testing.T) {
+	f := QueryFilter{[]queryFilterAction{
+		{ReplaceType, "foo", "REDACTED"},
+		{DeleteType, "bar", ""},
+	}}
+
+	out := f.Filter(zapcore.Field{String: "/path?foo=a&foo=b&bar=c&bar=d&baz=e"})
+	if out.String != "/path?baz=e&foo=REDACTED" {
+		t.Fatalf("query parameters have not been filtered: %s", out.String)
+	}
+}
To me it's not really intuitive (despite the obvious goal to redact the values) that two `foo` keys go in (values `a` and `b`) but only one `foo` key is expected to come out. Is this somehow rooted in the way caddy in general treats queries and logs them?