use instance_id instead of domain on provider level logging (#2943)
authorFabian Munkes <105975993+fmunkes@users.noreply.github.com>
Fri, 16 Jan 2026 14:35:01 +0000 (15:35 +0100)
committerGitHub <noreply@github.com>
Fri, 16 Jan 2026 14:35:01 +0000 (15:35 +0100)
* use instance id instead of domain in logging

* feedback

music_assistant/models/provider.py

index 97e4c940072b36e497371eacef67a6c3877d0cff..07f0e0eb717e03c363fc0ea9a4a64c61f6ca9979 100644 (file)
@@ -35,7 +35,11 @@ class Provider:
         self.config = config
         self._supported_features = supported_features or set()
         mass_logger = logging.getLogger(MASS_LOGGER_NAME)
-        self.logger = mass_logger.getChild(self.domain)
+        self.logger = (
+            mass_logger.getChild(self.domain)
+            if self.name != self.config.name
+            else mass_logger.getChild(f"{self.domain} ({self.name})")
+        )
         log_level = str(config.get_value(CONF_LOG_LEVEL))
         if log_level == "GLOBAL":
             self.logger.setLevel(mass_logger.level)