{"record":{"id":"e1a991357e8cfbb6","repo":"karatelabs/karate","slug":"configure-printenabled-is-deprecated-print-karate-log-go-to","errorCode":null,"errorMessage":"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","messagePattern":"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 = (.+?)\\}' to quiet all karate console output","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"karate-core/src/main/java/io/karatelabs/core/KarateConfig.java","lineNumber":441,"sourceCode":"            }\n            case \"afterFeature\" -> {\n                this.afterFeature = value;\n            }\n            case \"onStepFailure\" -> {\n                this.onStepFailure = value;\n            }\n\n            // Driver configuration\n            case \"driver\" -> {\n                this.driverConfig = value;\n            }\n\n            // Deprecated v1 options - no-op with one-line migration hint\n            case \"logPrettyRequest\", \"logPrettyResponse\" -> {\n                logger.warn(\"configure '{}' is deprecated; use 'configure logging = {{ pretty: true|false }}'\", key);\n            }\n            case \"printEnabled\" -> {\n                logger.warn(\"configure 'printEnabled' is deprecated; print/karate.log go to the 'karate.scenario' \"\n                        + \"SLF4J category - set its level to WARN in logback.xml to keep them off the console, \"\n                        + \"or 'configure logging = {{ console: \\\"warn\\\" }}' to quiet all karate console output\");\n            }\n            case \"lowerCaseResponseHeaders\" -> {\n                logger.warn(\"configure 'lowerCaseResponseHeaders' is deprecated; \"\n                        + \"'match header X' is already case-insensitive and 'karate.lowerCase(responseHeaders)' \"\n                        + \"covers direct map access\");\n            }\n            case \"logModifier\" -> {\n                logger.warn(\"configure 'logModifier' is removed; \"\n                        + \"use the declarative form: 'configure logging = {{ mask: {{ headers: [...], jsonPaths: [...], patterns: [...] }} }}'\");\n            }\n\n            // No channel-type cases: channels (grpc, kafka, …) are configured via their rich\n            // JS object — karate.channel('kafka') / the boot.ext('kafka') object — not via global\n            // 'configure <type>'. 'configure' stays strict so key typos fail loudly.\n            default -> throw new RuntimeException(\"unexpected 'configure' key: '\" + key + \"'\");\n        }","sourceCodeStart":423,"sourceCodeEnd":459,"githubUrl":"https://github.com/karatelabs/karate/blob/a22eb90246d958d15a47bf436693d0121ad2812d/karate-core/src/main/java/io/karatelabs/core/KarateConfig.java#L423-L459","documentation":"Karate v2 removed the `configure printEnabled` option; print() and karate.log output now go to the 'karate.scenario' SLF4J category, so console noise is controlled via logback levels instead. Setting printEnabled is a no-op that logs this deprecation warning with migration instructions.","triggerScenarios":"A feature file or karate-config.js containing `configure printEnabled = false` (or true) — usually to silence print output — after upgrading from Karate v1.","commonSituations":"v1→v2 migration of karate-config.js; CI setups that relied on printEnabled to quiet logs; copied config snippets from older project templates.","solutions":["Remove `configure printEnabled` and set the 'karate.scenario' logger level to WARN in logback.xml to hide print/karate.log from the console","Alternatively use `configure logging = { console: \"warn\" }` to quiet all Karate console output","Grep karate-config.js and feature files for printEnabled and delete the lines","Re-run and confirm console output level matches expectations"],"exampleFix":"// before\n* configure printEnabled = false\n// after (logback.xml)\n<logger name=\"karate.scenario\" level=\"WARN\"/>","handlingStrategy":"validation","validationCode":"grep -rn 'configure printEnabled' karate-config.js features/ && echo 'deprecated configure key found'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Control print/karate.log verbosity via the 'karate.scenario' SLF4J logger level, not configure","Keep a logback.xml with karate.scenario level explicitly set","Remove v1-era printEnabled lines during migration","Run a smoke suite after migration and read all deprecation warnings"],"tags":["deprecation","configuration","migration","logging","logback"],"backgroundTag":"deprecated-api-usage","analyzedSha":"a22eb90246d958d15a47bf436693d0121ad2812d","analyzedAt":"2026-09-12T09:01:00.220Z","contentChangedAt":"2026-09-12T09:01:00.220Z","schemaVersion":2},"datasetVersion":"2026-09-16T19:17:19.609Z"}