{"record":{"id":"dce95adafb608df3","repo":"oracle/graal","slug":"unknown-dump-level-levelstring-expected-basic","errorCode":null,"errorMessage":"Unknown dump level: \"<levelString>\" expected basic, info, verbose or an integer","messagePattern":"Unknown dump level: \"<levelString>\" expected basic, info, verbose or an integer","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/debug/DebugFilter.java","lineNumber":92,"sourceCode":"                } else {\n                    pattern = t.substring(0, idx);\n                    if (idx + 1 < t.length()) {\n                        String levelString = t.substring(idx + 1);\n                        try {\n                            level = Integer.parseInt(levelString);\n                        } catch (NumberFormatException e) {\n                            switch (levelString) {\n                                case \"basic\":\n                                    level = DebugContext.BASIC_LEVEL;\n                                    break;\n                                case \"info\":\n                                    level = DebugContext.INFO_LEVEL;\n                                    break;\n                                case \"verbose\":\n                                    level = DebugContext.VERBOSE_LEVEL;\n                                    break;\n                                default:\n                                    throw new IllegalArgumentException(\"Unknown dump level: \\\"\" + levelString + \"\\\" expected basic, info, verbose or an integer\");\n                            }\n                        }\n\n                    } else {\n                        level = DebugContext.BASIC_LEVEL;\n                    }\n                }\n\n                this.terms[i] = new Term(pattern, level);\n            }\n        }\n    }\n\n    /**\n     * Check whether {@link Scope#getQualifiedName()} is matched by this filter, and determine the\n     * log level.\n     */\n    public int matchLevel(DebugContext.Scope scope) {","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/debug/DebugFilter.java#L74-L110","documentation":"DebugFilter parses the level part of Graal dump/filter specifications (the text after ':' in -Dgraal.Dump=MethodFilter:Level). A level must be an integer or one of the named levels basic, info, verbose; anything else throws this IllegalArgumentException naming the bad token and the accepted values.","triggerScenarios":"Passing -Dgraal.Dump=:detailed, -Dgraal.Dump=Foo:0x2, or a level string with a typo/case mismatch (e.g. 'VERBOSE ' with trailing space, 'Basic'). Integer parse fails first (NumberFormatException) and the named-level switch then also misses, producing the error.","commonSituations":"Copy-pasting dump flags from blog posts or older Graal docs whose level vocabulary differs; shell quoting mishaps that leave stray characters; using a debug level name from a different tool (e.g. HotSpot's LogLevel names like 'trace' or 'debug').","solutions":["Use one of the accepted spellings: basic, info, verbose, or a plain integer (0=basic, 1=info, 2=verbose levels as defined by DebugContext).","Check for typos, trailing spaces, and quoting artifacts in the -Dgraal.Dump / -Dgraal.Filter value.","Refer to the option's help text (mx graal-options or the Graal docs) for the current level vocabulary."],"exampleFix":"# before\n-Dgraal.Dump=Foo.Bar:detailed\n\n# after\n-Dgraal.Dump=Foo.Bar:verbose","handlingStrategy":"validation","validationCode":"static int parseDumpLevel(String s) {\n    switch (s) {\n        case \"basic\": return 0;\n        case \"info\": return 1;\n        case \"verbose\": return 2;\n        default:\n            int lvl = Integer.parseInt(s); // NumberFormatException here gives a clearer error\n            if (lvl < 0) throw new IllegalArgumentException(\"negative level\");\n            return lvl;\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate dump-level strings in one place before handing them to Graal options.","Quote -Dgraal.Dump values in scripts to prevent shell mangling of ':level' suffixes."],"tags":["debug-options","dump-filter","configuration","illegal-argument"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}