karatelabs/karate · error · RuntimeException
'output.logLevel' is no longer supported in…
Error message
'output.logLevel' is no longer supported in karate-pom.json; use 'logging.report' (and optionally 'logging.console') at the top level (see docs/MIGRATION_GUIDE.md#logging)
What it means
The 'output.logLevel' karate-pom.json option was hard-removed in 2.0.6 and now triggers a deliberate migration error telling you to move logging configuration to the top-level 'logging.report' (and optionally 'logging.console') keys. It exists so the old setting is not silently ignored.
Solutions
- Remove 'output.logLevel' from karate-pom.json
- Add top-level "logging": { "report": "...", "console": "..." } per docs/MIGRATION_GUIDE.md#logging
- Review the MIGRATION_GUIDE for the exact logging key names and accepted values
Example fix
// before (karate-pom.json)
{ "output": { "logLevel": "DEBUG" } }
// after
{ "logging": { "report": "DEBUG", "console": "INFO" } } Defensive patterns
Strategy: validation
Validate before calling
// CI guard: reject removed keys before running Karate if grep -q 'output.logLevel' karate-pom.json; then echo 'remove output.logLevel; use logging.report/logging.console'; exit 1; fi
Try / catch
try {
KaratePom pom = KaratePom.load(path);
} catch (RuntimeException e) {
if (e.getMessage().contains("output.logLevel")) throw new IllegalStateException("migrate logging config per docs/MIGRATION_GUIDE.md#logging");
throw e;
} Prevention
- After upgrading to 2.0.6+, replace output.logLevel with top-level logging.report/logging.console
- Read docs/MIGRATION_GUIDE.md#logging before version bumps
- Add a CI check that fails on removed config keys
When it happens
Trigger: A karate-pom.json (or JSON passed to KaratePom.parse) containing an output.logLevel key while the output section is being parsed.
Common situations: Upgrading from pre-2.0.6 to 2.0.6+ with an old config file; copying config examples from older blog posts or docs; merges that resurrect a removed key.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- configure ' ' is deprecated; use 'configure logging = }
- configure 'printEnabled' is deprecated; print/karate.log go…
- configure 'lowerCaseResponseHeaders' is deprecated; 'match…
- configure 'logModifier' is removed; use the declarative…
- 'configure report = ' is no longer supported; use…
AI-assisted analysis of karatelabs/karate@a22eb90246 (2026-09-12).
Data as JSON: /api/errors/5d08c36b20a43ef3.
Report an issue: GitHub.
Appendix: source
Thrown at karate-core/src/main/java/io/karatelabs/core/KaratePom.java:227
j.<Integer>getOptional("threads").ifPresent(config::setThreads);
j.<String>getOptional("scenarioName").ifPresent(config::setScenarioName);
j.<String>getOptional("configDir").ifPresent(config::setConfigDir);
j.<Boolean>getOptional("dryRun").ifPresent(config::setDryRun);
j.<Boolean>getOptional("clean").ifPresent(config::setClean);
j.<String>getOptional("workingDir").ifPresent(config::setWorkingDir);
// Parse output config
if (j.pathExists("output")) {
OutputPom output = config.getOutput();
j.<String>getOptional("output.dir").ifPresent(output::setDir);
j.<Boolean>getOptional("output.html").ifPresent(output::setHtml);
j.<Boolean>getOptional("output.junitXml").ifPresent(output::setJunitXml);
j.<Boolean>getOptional("output.cucumberJson").ifPresent(output::setCucumberJson);
j.<Boolean>getOptional("output.jsonLines").ifPresent(output::setJsonLines);
// Hard-removed in 2.0.6: was previously the report-buffer threshold.
// Surface a clear migration error rather than silently ignoring.
if (j.pathExists("output.logLevel")) {
throw new RuntimeException(
"'output.logLevel' is no longer supported in karate-pom.json; use "
+ "'logging.report' (and optionally 'logging.console') at the top level "
+ "(see docs/MIGRATION_GUIDE.md#logging)");
}
}
// Parse logging config
if (j.pathExists("logging")) {
LoggingPom logging = new LoggingPom();
j.<String>getOptional("logging.report").ifPresent(logging::setReport);
j.<String>getOptional("logging.console").ifPresent(logging::setConsole);
config.setLogging(logging);
}
// Parse listeners
j.<List<String>>getOptional("listeners").ifPresent(config::setListeners);
j.<List<String>>getOptional("listenerFactories").ifPresent(config::setListenerFactories);
View on GitHub (pinned to a22eb90246)