{"record":{"id":"832bd861e4d5ddc1","repo":"apache/cassandra","slug":"an-empty-map-of-logger-names-and-their-logging-lev","errorCode":null,"errorMessage":"An empty map of logger names and their logging levels was returned, because you are using an unsupported slf4j logging implementation for which this functionality was not implemented.","messagePattern":"An empty map of logger names and their logging levels was returned, because you are using an unsupported slf4j logging implementation for which this functionality was not implemented\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/utils/logging/NoOpFallbackLoggingSupport.java","lineNumber":45,"sourceCode":"/**\n * A fallback implementation with empty implementations which ensures other slf4j bindings (logging implementations)\n * than the default supported framework can be used. This loses functionality, but is perfectly fine for most\n * integration test requirements of applications using an embedded cassandra server.\n */\npublic class NoOpFallbackLoggingSupport implements LoggingSupport\n{\n    private static final Logger logger = LoggerFactory.getLogger(NoOpFallbackLoggingSupport.class);\n\n    @Override\n    public void setLoggingLevel(String classQualifier, String rawLevel) throws Exception\n    {\n        logger.warn(\"The log level was not changed, because you are using an unsupported slf4j logging implementation for which this functionality was not implemented.\");\n    }\n\n    @Override\n    public Map<String, String> getLoggingLevels()\n    {\n        logger.warn(\"An empty map of logger names and their logging levels was returned, because you are using an unsupported slf4j logging implementation for which this functionality was not implemented.\");\n        return Collections.emptyMap();\n    }\n}\n","sourceCodeStart":27,"sourceCodeEnd":49,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/utils/logging/NoOpFallbackLoggingSupport.java#L27-L49","documentation":"NoOpFallbackLoggingSupport.getLoggingLevels logs this warning and returns Collections.emptyMap() because, without logback, there is no way to enumerate logger levels. Callers of nodetool getlogginglevels or the JMX getLoggingLevels operation receive an empty map in unsupported deployments.","triggerScenarios":"Invoking nodetool getlogginglevels (or StorageService/JMX getLoggingLevels) while slf4j is bound to a non-logback provider, so the NoOp fallback implementation runs.","commonSituations":"Monitoring scripts parsing getlogginglevels output that get an empty map and misreport log configuration; diagnosing logging on a node built without logback.","solutions":["Restore logback as the slf4j backend so getLoggingLevels returns the real logger/level map.","Parse the startup 'unsupported deployment' warning to identify and remove the competing slf4j binding.","As a workaround, read conf/logback.xml directly for the configured levels.","Update automation to detect the empty map and treat it as 'levels unavailable' rather than 'all defaults'."],"exampleFix":"// before: Map<String,String> levels = ssProxy.getLoggingLevels(); (always empty) // after: if (levels.isEmpty()) { logger.warn(\"NoOp logging support active; inspect conf/logback.xml manually\"); }","handlingStrategy":"fallback","validationCode":"Map<String,String> levels = ssProxy.getLoggingLevels(); if (levels.isEmpty()) { // NoOp logging support active - read config file instead levels = parseLogbackXmlLevels(\"conf/logback.xml\"); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat an empty getlogginglevels result as 'unsupported logging backend', not 'no loggers'.","Ensure logback is the slf4j provider so introspection works.","Parse logback.xml directly in monitoring scripts as a fallback.","Check startup logs for the unsupported-deployment warning when levels look empty."],"tags":["logging","slf4j","jmx","noop","introspection"],"backgroundTag":"unsupported-operation","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}