{"record":{"id":"7419541aa8960722","repo":"jaegertracing/jaeger","slug":"unrecognized-log-level-q-valid-values-are-debug","errorCode":null,"errorMessage":"unrecognized log_level %q: valid values are debug, info, error","messagePattern":"unrecognized log_level %q: valid values are debug, info, error","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/elasticsearch/config/config.go","lineNumber":573,"sourceCode":"// write_mode carries no govalidator struct tag, so the whole-config Validate must\n// check it explicitly.\nfunc validateWriteMode(mode WriteMode) error {\n\tswitch mode {\n\tcase \"\", WriteModeAsync, WriteModeSync:\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"unrecognized write_mode %q: valid values are %q and %q\", mode, WriteModeAsync, WriteModeSync)\n\t}\n}\n\n// validateLogLevel rejects an unrecognized log_level. An empty value is allowed\n// and means no client logging is attached.\nfunc validateLogLevel(level string) error {\n\tswitch level {\n\tcase \"\", \"debug\", \"info\", \"error\":\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"unrecognized log_level %q: valid values are debug, info, error\", level)\n\t}\n}\n\n// rejectUnwiredKey builds the validation error for a config key that the current\n// Elasticsearch client no longer reads, pointing operators at the PR that explains\n// the change. The migration is always the same: remove the key.\nfunc rejectUnwiredKey(key, reason string) error {\n\treturn fmt.Errorf(\n\t\t\"'%s' is no longer supported: %s; please remove the setting \"+\n\t\t\t\"(see https://github.com/jaegertracing/jaeger/pull/9076)\",\n\t\tkey, reason,\n\t)\n}\n","sourceCodeStart":555,"sourceCodeEnd":587,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/elasticsearch/config/config.go#L555-L587","documentation":"The Elasticsearch storage config allows an optional log_level that attaches client-side logging to the ES client. Only '', 'debug', 'info', and 'error' are accepted; anything else fails validation in validateLogLevel. This keeps operator typos from silently disabling the intended client logging.","triggerScenarios":"Setting log_level in the Elasticsearch storage config (or the corresponding config field) to any string other than '', 'debug', 'info', or 'error' and calling Validate.","commonSituations":"Typo such as log_level: warning or log_level: trace (valid for other loggers but not here); copying a level name from a different component's config.","solutions":["Change log_level to one of: (empty), 'debug', 'info', 'error'","Remove the log_level key to disable client logging","Use the component's general logging flags instead if you need levels like 'warn'"],"exampleFix":"// before\nlog_level: warning\n// after\nlog_level: error","handlingStrategy":"validation","validationCode":"validLogLevels := map[string]bool{\"\": true, \"debug\": true, \"info\": true, \"error\": true}\nif !validLogLevels[cfg.LogLevel] {\n    return fmt.Errorf(\"log_level must be one of: (empty), debug, info, error; got %q\", cfg.LogLevel)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the exact level strings from the Jaeger ES config docs","Do not reuse level names ('warn', 'trace') from other loggers","Run config validation in CI"],"tags":["elasticsearch","config-validation","logging"],"backgroundTag":"invalid-config-value","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}