karatelabs/karate · warning
configure ' ' is deprecated; use 'configure logging = }
Error message
configure '{}' is deprecated; use 'configure logging = {{ pretty: true|false }}' What it means
Karate v2 removed the v1 `configure logPrettyRequest` / `configure logPrettyResponse` options. Setting either is now a no-op that logs this deprecation warning pointing to the unified `configure logging = { pretty: true|false }` syntax. Scripts still run, but the old keys no longer change behavior.
Solutions
- Replace both keys with `configure logging = { pretty: true }` (or false) in the feature/config
- Search the codebase (karate-config.js, *.feature) for logPrettyRequest/logPrettyResponse and update all occurrences
- Verify pretty logging works by checking request/response output after the change
- Update internal docs/templates to the v2 logging syntax
Example fix
// before
* configure logPrettyRequest = true
* configure logPrettyResponse = true
// after
* configure logging = { pretty: true } Defensive patterns
Strategy: validation
Validate before calling
grep -rnE 'configure\s+(logPrettyRequest|logPrettyResponse)' karate-config.js features/ && echo 'deprecated configure keys found'
Prevention
- Audit karate-config.js and feature files for v1 configure keys after upgrading
- Use `configure logging = { pretty: true|false }` for all pretty-log settings
- Follow Karate v2 migration docs when porting configs
- Treat deprecation warnings in CI logs as blocking tech debt
When it happens
Trigger: A feature file or JS bootstrap containing `configure logPrettyRequest = true` or `configure logPrettyResponse = false`, typically carried over from a Karate v1 project after upgrading.
Common situations: v1→v2 migration where karate-config.js or feature setup blocks were copied unchanged; team style guides referencing old docs; snippets from outdated tutorials/Stack Overflow answers.
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 'printEnabled' is deprecated; print/karate.log go…
- 'configure report = ' is no longer supported; use…
- configure 'lowerCaseResponseHeaders' is deprecated; 'match…
- configure 'logModifier' is removed; use the declarative…
- configure 'logging' expects a map, got
AI-assisted analysis of karatelabs/karate@a22eb90246 (2026-09-12).
Data as JSON: /api/errors/4d1d5a0512df0c36.
Report an issue: GitHub.
Appendix: source
Thrown at karate-core/src/main/java/io/karatelabs/core/KarateConfig.java:438
}
case "afterScenarioOutline" -> {
this.afterScenarioOutline = value;
}
case "afterFeature" -> {
this.afterFeature = value;
}
case "onStepFailure" -> {
this.onStepFailure = value;
}
// Driver configuration
case "driver" -> {
this.driverConfig = value;
}
// Deprecated v1 options - no-op with one-line migration hint
case "logPrettyRequest", "logPrettyResponse" -> {
logger.warn("configure '{}' is deprecated; use 'configure logging = {{ pretty: true|false }}'", key);
}
case "printEnabled" -> {
logger.warn("configure 'printEnabled' is deprecated; print/karate.log go to the 'karate.scenario' "
+ "SLF4J category - set its level to WARN in logback.xml to keep them off the console, "
+ "or 'configure logging = {{ console: \"warn\" }}' to quiet all karate console output");
}
case "lowerCaseResponseHeaders" -> {
logger.warn("configure 'lowerCaseResponseHeaders' is deprecated; "
+ "'match header X' is already case-insensitive and 'karate.lowerCase(responseHeaders)' "
+ "covers direct map access");
}
case "logModifier" -> {
logger.warn("configure 'logModifier' is removed; "
+ "use the declarative form: 'configure logging = {{ mask: {{ headers: [...], jsonPaths: [...], patterns: [...] }} }}'");
}
// No channel-type cases: channels (grpc, kafka, …) are configured via their rich
// JS object — karate.channel('kafka') / the boot.ext('kafka') object — not via globalView on GitHub (pinned to a22eb90246)