quickwit-oss/quickwit · error
failed to parse Kafka client log level. value `{}` is not su
Error message
failed to parse Kafka client log level. value `{}` is not supported What it means
`parse_client_log_level` (used when creating the Kafka consumer) lowercased the configured client log level and matched it against the accepted values (debug, info, warn/warning, error, critical); none matched. The value comes from the Kafka source parameters (log_level client setting) and is a pure input-validation failure.
Source
Thrown at quickwit/quickwit-indexing/src/source/kafka_source.rs:700
})
.context("failed to create Kafka consumer")?;
Ok((client_config, consumer, group_id))
}
fn parse_client_log_level(client_log_level: Option<String>) -> anyhow::Result<RDKafkaLogLevel> {
let log_level = match client_log_level
.map(|log_level| log_level.to_lowercase())
.as_deref()
{
Some("debug") => RDKafkaLogLevel::Debug,
Some("info") | None => RDKafkaLogLevel::Info,
Some("warn") | Some("warning") => RDKafkaLogLevel::Warning,
Some("error") => RDKafkaLogLevel::Error,
Some("critical") => RDKafkaLogLevel::Critical,
Some("alert") => RDKafkaLogLevel::Alert,
Some("emerg") => RDKafkaLogLevel::Emerg,
Some(level) => bail!(
"failed to parse Kafka client log level. value `{}` is not supported",
level
),
};
Ok(log_level)
}
fn parse_client_params(client_params: JsonValue) -> anyhow::Result<ClientConfig> {
let params = if let JsonValue::Object(params) = client_params {
params
} else {
bail!("failed to parse Kafka client parameters. `client_params` must be a JSON object");
};
let mut client_config = ClientConfig::new();
for (key, value_json) in params {
let value = match value_json {
JsonValue::Bool(value_bool) => value_bool.to_string(),
JsonValue::Number(value_number) => value_number.to_string(),View on GitHub (pinned to a39730c5cd)
Solutions
- Use one of the accepted log level values: `debug`, `info`, `warn`, `warning`, `error`, or `critical`
- Omit the setting to fall back to the default `info` level
Example fix
// before
"client_params": { "client_log_level": "trace" }
// after
"client_params": { "client_log_level": "debug" } Defensive patterns
Strategy: validation
Validate before calling
const LEVELS = ["debug","info","warn","warning","error","critical","alert","emerg"];
if (!LEVELS.includes(params.client_log_level)) throw new Error(`client_log_level must be one of ${LEVELS}`); Prevention
- Only use rdkafka log level names, lowercase.
- Omit client_log_level unless tuning log verbosity.
- Keep a config schema/linter for source params.
When it happens
Trigger: `create_consumer` parses the `client_log_level` entry from the source's `client_params` JSON and the value is not one of debug, info, warn/warning, error, critical, alert, or emerg.
Common situations: Typo like `trace` or `WARNING` (uppercase) or `debug` misspelled; copying a SLF4J/log4j level name that rdkafka does not support.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- topic `{}` does not exist
- failed to parse Kafka client parameters. `client_params` mus
- failed to parse Kafka client parameters. `client_params.{}`
- unknown URI protocol `{protocol}`
- GCP PubSub subscription `{subscription_name}` does not exist
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/b33b9003d3f66a7b.
Report an issue: GitHub.