{"record":{"id":"ade14ae7927dc1be","repo":"BerriAI/litellm","slug":"no-active-custom-logger-found-for-callback-name","errorCode":null,"errorMessage":"No active custom logger found for callback name: {callback_name}","messagePattern":"No active custom logger found for callback name: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/litellm_core_utils/logging_callback_manager.py","lineNumber":478,"sourceCode":"    def get_active_custom_logger_for_callback_name(\n        self,\n        callback_name: _custom_logger_compatible_callbacks_literal,\n    ) -> CustomLogger | None:\n        \"\"\"\n        Get the active custom logger for a given callback name\n        \"\"\"\n        from litellm.litellm_core_utils.custom_logger_registry import (\n            CustomLoggerRegistry,\n        )\n\n        # get the custom logger class type\n        custom_logger_class_type: Final = CustomLoggerRegistry.get_class_type_for_custom_logger_name(callback_name)\n\n        # get the active custom logger\n        custom_logger: Final = self.get_custom_loggers_for_type(custom_logger_class_type)\n\n        if len(custom_logger) == 0:\n            raise ValueError(f\"No active custom logger found for callback name: {callback_name}\")\n\n        return custom_logger[0]\n","sourceCodeStart":460,"sourceCodeEnd":481,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/litellm_core_utils/logging_callback_manager.py#L460-L481","documentation":"get_active_custom_logger_for_callback_name looks up the CustomLoggerRegistry class type for a callback name, then searches the currently active litellm.callbacks list for instances of that type. If zero instances are registered, it raises ValueError. This happens when config references a named callback (e.g. 'langfuse', 'openmeter') that was never activated — the class exists in the registry but no live logger object was added to litellm.callbacks.","triggerScenarios":"Setting a config field like success_callback=['langfuse'] without the integration package installed or without litellm initializing the callback; referencing a callback name in proxy config.yaml while the corresponding env vars/credentials are missing so activation was skipped; calling get_active_custom_logger_for_callback_name manually before litellm.settings.callbacks is populated.","commonSituations":"Missing 'langfuse' pip package; proxy config lists a callback whose required env keys (e.g. LANGFUSE_PUBLIC_KEY) are absent so the logger never activates; ordering issues where the lookup runs before callback initialization; typos in callback names that silently map to a registry entry but never get instantiated.","solutions":["Install the integration package for the callback (e.g. pip install 'litellm[langfuse]') and set its required env variables, then restart so the logger activates.","Verify activation at runtime: assert any(isinstance(c, ExpectedLoggerClass) for c in litellm.callbacks) before the lookup.","Check the proxy/general settings logs for callback initialization errors that were swallowed earlier.","If calling the API yourself, fall back gracefully when zero loggers are found."],"exampleFix":"// before\nfrom litellm.litellm_core_utils.logging_callback_manager import LoggingCallbackManager\nlogger = mgr.get_active_custom_logger_for_callback_name('langfuse')\n\n# after\nimport litellm\nloggers = [c for c in litellm.callbacks if type(c).__name__.lower().startswith('langfuse')]\nlogger = loggers[0] if loggers else None","handlingStrategy":"validation","validationCode":"import litellm\n\ndef callback_is_active(name: str) -> bool:\n    return any(type(c).__name__.lower().startswith(name.lower()) for c in litellm.callbacks)","typeGuard":null,"tryCatchPattern":"try:\n    logger = mgr.get_active_custom_logger_for_callback_name('langfuse')\nexcept ValueError:\n    logger = None  # observability optional; degrade gracefully","preventionTips":["Install integration extras and set required env vars before starting the proxy.","Health-check callback activation at startup: assert litellm.callbacks is non-empty for each configured name.","Watch startup logs for silent callback initialization failures."],"tags":["callbacks","observability","configuration","registry"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}