jaegertracing/jaeger · error
unrecognized log_level %q: valid values are debug, info, err
Error message
unrecognized log_level %q: valid values are debug, info, error
What it means
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.
Source
Thrown at internal/storage/elasticsearch/config/config.go:573
// write_mode carries no govalidator struct tag, so the whole-config Validate must
// check it explicitly.
func validateWriteMode(mode WriteMode) error {
switch mode {
case "", WriteModeAsync, WriteModeSync:
return nil
default:
return fmt.Errorf("unrecognized write_mode %q: valid values are %q and %q", mode, WriteModeAsync, WriteModeSync)
}
}
// validateLogLevel rejects an unrecognized log_level. An empty value is allowed
// and means no client logging is attached.
func validateLogLevel(level string) error {
switch level {
case "", "debug", "info", "error":
return nil
default:
return fmt.Errorf("unrecognized log_level %q: valid values are debug, info, error", level)
}
}
// rejectUnwiredKey builds the validation error for a config key that the current
// Elasticsearch client no longer reads, pointing operators at the PR that explains
// the change. The migration is always the same: remove the key.
func rejectUnwiredKey(key, reason string) error {
return fmt.Errorf(
"'%s' is no longer supported: %s; please remove the setting "+
"(see https://github.com/jaegertracing/jaeger/pull/9076)",
key, reason,
)
}
View on GitHub (pinned to 806f444784)
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'
Example fix
// before log_level: warning // after log_level: error
Defensive patterns
Strategy: validation
Validate before calling
validLogLevels := map[string]bool{"": true, "debug": true, "info": true, "error": true}
if !validLogLevels[cfg.LogLevel] {
return fmt.Errorf("log_level must be one of: (empty), debug, info, error; got %q", cfg.LogLevel)
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- unrecognized write_mode %q: valid values are %q and %q
- '%s' is no longer supported: %s; please remove the setting (
- cannot use both 'rotation' config and legacy flags (%s) simu
- indices.%s: cannot use both 'rotation' config and legacy 'da
- indices.%s.rotation: exactly one rotation strategy must be s
AI-assisted analysis of jaegertracing/jaeger@806f444784 (2026-09-01).
Data as JSON: /api/errors/7419541aa8960722.
Report an issue: GitHub.