MCPcopy
hub / github.com/caddyserver/caddy / RegexpFilter

Struct RegexpFilter

modules/logging/filters.go:572–580  ·  view source on GitHub ↗

RegexpFilter is a Caddy log field filter that replaces the field matching the provided regexp with the indicated string. If the field is an array of strings, each of them will have the regexp replacement applied.

Source from the content-addressed store, hash-verified

570// array of strings, each of them will have the
571// regexp replacement applied.
572type RegexpFilter struct {
573 // The regular expression pattern defining what to replace.
574 RawRegexp string `json:"regexp,omitempty"`
575
576 // The value to use as replacement
577 Value string `json:"value,omitempty"`
578
579 regexp *regexp.Regexp
580}
581
582// CaddyModule returns the Caddy module information.
583func (RegexpFilter) CaddyModule() caddy.ModuleInfo {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected