silence smb logger
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Thu, 9 Mar 2023 17:02:53 +0000 (18:02 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Thu, 9 Mar 2023 17:02:53 +0000 (18:02 +0100)
music_assistant/server/providers/filesystem_smb/__init__.py

index 3a7c182c64b129294ac8fe1367adcc39de56fb4e..581f3fb13280a17755d0056578ed34dd6048cd08 100644 (file)
@@ -1,6 +1,7 @@
 """SMB filesystem provider for Music Assistant."""
 
 import contextvars
+import logging
 import os
 from collections.abc import AsyncGenerator
 from contextlib import asynccontextmanager
@@ -49,6 +50,8 @@ class SMBFileSystemProvider(FileSystemProviderBase):
 
     async def setup(self) -> None:
         """Handle async initialization of the provider."""
+        # silence SMB.SMBConnection logger a bit
+        logging.getLogger("SMB.SMBConnection").setLevel("INFO")
         # extract params from path
         if self.config.get_value(CONF_PATH).startswith("\\\\"):
             path_parts = self.config.get_value(CONF_PATH)[2:].split("\\", 2)