{"record":{"id":"d942f8184e93b5e9","repo":"apache/cassandra","slug":"error-setting-log-for-on-level-please-check-log","errorCode":null,"errorMessage":"Error setting log for  on level . Please check logback configuration.","messagePattern":"Error setting log for  on level \\. Please check logback configuration\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/NodeProbe.java","lineNumber":2423,"sourceCode":"    public TabularData getCompactionHistory()\n    {\n        return compactionProxy.getCompactionHistory();\n    }\n\n    public void reloadTriggers()\n    {\n        spProxy.reloadTriggerClasses();\n    }\n\n    public void setLoggingLevel(String classQualifier, String level)\n    {\n        try\n        {\n            ssProxy.setLoggingLevel(classQualifier, level);\n        }\n        catch (Exception e)\n        {\n            throw new RuntimeException(\"Error setting log for \" + classQualifier + \" on level \" + level + \". Please check logback configuration.\", e);\n        }\n    }\n\n    public Map<String, String> getLoggingLevels()\n    {\n        return ssProxy.getLoggingLevels();\n    }\n\n    public long getPid()\n    {\n        return NativeLibrary.getProcessID();\n    }\n\n    public void resumeBootstrap(PrintStream out) throws IOException\n    {\n        BootstrapMonitor monitor = new BootstrapMonitor(out);\n        try\n        {","sourceCodeStart":2405,"sourceCodeEnd":2441,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/NodeProbe.java#L2405-L2441","documentation":"NodeProbe wraps any exception thrown while changing a class's logging level via the StorageService JMX MBean (ssProxy.setLoggingLevel) into a RuntimeException. This means the requested class qualifier or log level was rejected by the server-side logback configuration, or the JMX call itself failed. The original cause is attached as the exception cause.","triggerScenarios":"Calling `nodetool setlogginglevel <class> <level>` (or NodeProbe.setLoggingLevel) with a class name that does not exist, a level that is not a valid logback level (TRACE/DEBUG/INFO/WARN/ERROR), or when the JMX connection fails mid-call.","commonSituations":"Typo in the logger class/package name; using a custom level like VERBOSITY with logback (which no longer accepts it, unlike log4j); logback reconfiguration errors on the node; stale JMX connection.","solutions":["Verify the class qualifier matches a real logger name (fully-qualified class or package), e.g. org.apache.cassandra.db.","Use a valid logback level: DEBUG, TRACE, INFO, WARN, or ERROR (VERBOSITY is a log4j-era level).","Inspect the exception cause (`nodetool` output or server log) to see the underlying logback error.","Confirm JMX connectivity (nodetool status works) and that logback.xml is valid on the node."],"exampleFix":"// before\nnodetool setlogginglevel org.apache.cassandra.db.Bootstrap VERBOSITY\n// after\nnodetool setlogginglevel org.apache.cassandra.db DEBUG","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"TRACE\",\"DEBUG\",\"INFO\",\"WARN\",\"ERROR\");\nif (!valid.contains(level.toUpperCase())) throw new IllegalArgumentException(\"Invalid log level: \" + level);\nif (!classQualifier.matches(\"[a-zA-Z0-9_.]+\")) throw new IllegalArgumentException(\"Invalid logger class: \" + classQualifier);","typeGuard":null,"tryCatchPattern":"try { probe.setLoggingLevel(cls, level); }\ncatch (RuntimeException e) { logger.error(\"setLoggingLevel failed for {} at {}: {}\", cls, level, e.getCause(), e); }","preventionTips":["Keep a whitelist of logger names you commonly adjust","Use only logback-supported levels, not legacy log4j VERBOSITY","Test setlogginglevel on a staging node first"],"tags":["jmx","logging","nodetool","logback"],"backgroundTag":"invalid-config-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}