{"record":{"id":"5d08c36b20a43ef3","repo":"karatelabs/karate","slug":"output-loglevel-is-no-longer-supported-in-karate-pom-json","errorCode":null,"errorMessage":"'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)","messagePattern":"'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\\)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"karate-core/src/main/java/io/karatelabs/core/KaratePom.java","lineNumber":227,"sourceCode":"        j.<Integer>getOptional(\"threads\").ifPresent(config::setThreads);\n        j.<String>getOptional(\"scenarioName\").ifPresent(config::setScenarioName);\n        j.<String>getOptional(\"configDir\").ifPresent(config::setConfigDir);\n        j.<Boolean>getOptional(\"dryRun\").ifPresent(config::setDryRun);\n        j.<Boolean>getOptional(\"clean\").ifPresent(config::setClean);\n        j.<String>getOptional(\"workingDir\").ifPresent(config::setWorkingDir);\n\n        // Parse output config\n        if (j.pathExists(\"output\")) {\n            OutputPom output = config.getOutput();\n            j.<String>getOptional(\"output.dir\").ifPresent(output::setDir);\n            j.<Boolean>getOptional(\"output.html\").ifPresent(output::setHtml);\n            j.<Boolean>getOptional(\"output.junitXml\").ifPresent(output::setJunitXml);\n            j.<Boolean>getOptional(\"output.cucumberJson\").ifPresent(output::setCucumberJson);\n            j.<Boolean>getOptional(\"output.jsonLines\").ifPresent(output::setJsonLines);\n            // Hard-removed in 2.0.6: was previously the report-buffer threshold.\n            // Surface a clear migration error rather than silently ignoring.\n            if (j.pathExists(\"output.logLevel\")) {\n                throw new RuntimeException(\n                        \"'output.logLevel' is no longer supported in karate-pom.json; use \"\n                                + \"'logging.report' (and optionally 'logging.console') at the top level \"\n                                + \"(see docs/MIGRATION_GUIDE.md#logging)\");\n            }\n        }\n\n        // Parse logging config\n        if (j.pathExists(\"logging\")) {\n            LoggingPom logging = new LoggingPom();\n            j.<String>getOptional(\"logging.report\").ifPresent(logging::setReport);\n            j.<String>getOptional(\"logging.console\").ifPresent(logging::setConsole);\n            config.setLogging(logging);\n        }\n\n        // Parse listeners\n        j.<List<String>>getOptional(\"listeners\").ifPresent(config::setListeners);\n        j.<List<String>>getOptional(\"listenerFactories\").ifPresent(config::setListenerFactories);\n","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/karatelabs/karate/blob/a22eb90246d958d15a47bf436693d0121ad2812d/karate-core/src/main/java/io/karatelabs/core/KaratePom.java#L209-L245","documentation":"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.","triggerScenarios":"A karate-pom.json (or JSON passed to KaratePom.parse) containing an output.logLevel key while the output section is being parsed.","commonSituations":"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.","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"],"exampleFix":"// before (karate-pom.json)\n{ \"output\": { \"logLevel\": \"DEBUG\" } }\n// after\n{ \"logging\": { \"report\": \"DEBUG\", \"console\": \"INFO\" } }","handlingStrategy":"validation","validationCode":"// CI guard: reject removed keys before running Karate\nif grep -q 'output.logLevel' karate-pom.json; then echo 'remove output.logLevel; use logging.report/logging.console'; exit 1; fi","typeGuard":null,"tryCatchPattern":"try {\n    KaratePom pom = KaratePom.load(path);\n} catch (RuntimeException e) {\n    if (e.getMessage().contains(\"output.logLevel\")) throw new IllegalStateException(\"migrate logging config per docs/MIGRATION_GUIDE.md#logging\");\n    throw e;\n}","preventionTips":["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"],"tags":["config","migration","deprecation"],"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"}