{"record":{"id":"d7147aef7e0e9afc","repo":"mlflow/mlflow","slug":"environment-variable-mlflow-logging-configure-logg","errorCode":null,"errorMessage":"Environment variable MLFLOW_LOGGING_CONFIGURE_LOGGING is deprecated and will be removed in a future release. Please use MLFLOW_CONFIGURE_LOGGING instead.","messagePattern":"Environment variable MLFLOW_LOGGING_CONFIGURE_LOGGING is deprecated and will be removed in a future release\\. Please use MLFLOW_CONFIGURE_LOGGING instead\\.","errorType":"console","errorClass":"FutureWarning","httpStatus":null,"severity":"warning","filePath":"mlflow/environment_variables.py","lineNumber":80,"sourceCode":"\nclass _BooleanEnvironmentVariable(_EnvironmentVariable):\n    \"\"\"\n    Represents a boolean environment variable.\n    \"\"\"\n\n    def __init__(self, name, default):\n        # `default not in [True, False, None]` doesn't work because `1 in [True]`\n        # (or `0 in [False]`) returns True.\n        if not (default is True or default is False or default is None):\n            raise ValueError(f\"{name} default value must be one of [True, False, None]\")\n        super().__init__(name, bool, default)\n\n    def get(self):\n        # TODO: Remove this block in MLflow 3.2.0\n        if self.name == MLFLOW_CONFIGURE_LOGGING.name and (\n            val := os.environ.get(\"MLFLOW_LOGGING_CONFIGURE_LOGGING\")\n        ):\n            warnings.warn(\n                \"Environment variable MLFLOW_LOGGING_CONFIGURE_LOGGING is deprecated and will be \"\n                f\"removed in a future release. Please use {MLFLOW_CONFIGURE_LOGGING.name} instead.\",\n                FutureWarning,\n                stacklevel=2,\n            )\n            return val.lower() in [\"true\", \"1\"]\n\n        if not self.defined:\n            return self.default\n\n        val = os.environ.get(self.name)\n        lowercased = val.lower()\n        if lowercased not in [\"true\", \"false\", \"1\", \"0\"]:\n            raise ValueError(\n                f\"{self.name} value must be one of ['true', 'false', '1', '0'] (case-insensitive), \"\n                f\"but got {val}\"\n            )\n        return lowercased in [\"true\", \"1\"]","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/environment_variables.py#L62-L98","documentation":"The MLFLOW_LOGGING_CONFIGURE_LOGGING environment variable was renamed to MLFLOW_CONFIGURE_LOGGING. MLflowEnvironmentVariable.get() detects the old name while reading the new variable and emits a FutureWarning, but still honors the old value (lowercased 'true'/'1' becomes True).","triggerScenarios":"Exporting MLFLOW_LOGGING_CONFIGURE_LOGGING=true (or 1) in the environment, then importing mlflow or reading MLFLOW_CONFIGURE_LOGGING.get(); the deprecated name is detected and warned about.","commonSituations":"Dockerfiles, CI configs, or shell profiles written before MLflow 3.2; copy-pasted env setup from older docs.","solutions":["Rename the variable: use MLFLOW_CONFIGURE_LOGGING=true instead of MLFLOW_LOGGING_CONFIGURE_LOGGING=true.","Update Dockerfiles, CI workflows, and shell profiles to the new name.","Remove the old variable entirely to avoid ambiguity if both are set."],"exampleFix":"# before\nexport MLFLOW_LOGGING_CONFIGURE_LOGGING=true\n\n# after\nexport MLFLOW_CONFIGURE_LOGGING=true","handlingStrategy":"validation","validationCode":"import os\nif \"MLFLOW_LOGGING_CONFIGURE_LOGGING\" in os.environ:\n    raise EnvironmentError(\"Use MLFLOW_CONFIGURE_LOGGING instead of MLFLOW_LOGGING_CONFIGURE_LOGGING\")","typeGuard":"def uses_deprecated_logging_env(env=os.environ) -> bool:\n    return \"MLFLOW_LOGGING_CONFIGURE_LOGGING\" in env","tryCatchPattern":"import warnings\nwith warnings.catch_warnings(record=True) as caught:\n    warnings.simplefilter(\"always\")\n    import mlflow\nfor w in caught:\n    if \"MLFLOW_LOGGING_CONFIGURE_LOGGING is deprecated\" in str(w.message):\n        print(\"rename env var to MLFLOW_CONFIGURE_LOGGING\")","preventionTips":["Set MLFLOW_CONFIGURE_LOGGING in all Dockerfiles/CI/shell profiles.","Grep deployment scripts for MLFLOW_LOGGING_ and update.","Set required env vars before importing mlflow.","Test container startup with warnings-as-errors to catch renamed variables early."],"tags":["python","environment-variables","deprecation","logging"],"backgroundTag":"deprecated-env-var","analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}