{"record":{"id":"a2ce7f5cfcdb0713","repo":"caddyserver/caddy","slug":"loading-log-filter-modules-v","errorCode":null,"errorMessage":"loading log filter modules: %v","messagePattern":"loading log filter modules: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/logging/filterencoder.go","lineNumber":107,"sourceCode":"\t\t\t}\n\t\t}\n\t\tfe.wrappedIsDefault = true\n\t} else {\n\t\t// set up wrapped encoder\n\t\tval, err := ctx.LoadModule(fe, \"WrappedRaw\")\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"loading fallback encoder module: %v\", err)\n\t\t}\n\t\tfe.wrapped = val.(zapcore.Encoder)\n\t}\n\n\t// set up each field filter\n\tif fe.Fields == nil {\n\t\tfe.Fields = make(map[string]LogFieldFilter)\n\t}\n\tvals, err := ctx.LoadModule(fe, \"FieldsRaw\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"loading log filter modules: %v\", err)\n\t}\n\tfor fieldName, modIface := range vals.(map[string]any) {\n\t\tfe.Fields[fieldName] = modIface.(LogFieldFilter)\n\t}\n\n\treturn nil\n}\n\n// ConfigureDefaultFormat will set the default format to \"console\"\n// if the writer is a terminal. If already configured as a filter\n// encoder, it passes through the writer so a deeply nested filter\n// encoder can configure its own default format.\nfunc (fe *FilterEncoder) ConfigureDefaultFormat(wo caddy.WriterOpener) error {\n\tif !fe.wrappedIsDefault {\n\t\tif cfd, ok := fe.wrapped.(caddy.ConfiguresFormatterDefault); ok {\n\t\t\treturn cfd.ConfigureDefaultFormat(wo)\n\t\t}\n\t\treturn nil","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/caddyserver/caddy/blob/50e54ee279aa1e504fe218ca49ab6ae16c100410/modules/logging/filterencoder.go#L89-L125","documentation":"Error \"loading log filter modules: %v\" thrown in caddyserver/caddy.","triggerScenarios":"Thrown at modules/logging/filterencoder.go:107 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for the failing log filter module and fix its configuration."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"50e54ee279aa1e504fe218ca49ab6ae16c100410","analyzedAt":"2026-08-15T09:20:21.641Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}