change log levels
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 1 Apr 2023 22:43:55 +0000 (00:43 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 1 Apr 2023 22:43:55 +0000 (00:43 +0200)
music_assistant/server/controllers/streams.py
music_assistant/server/helpers/audio.py
music_assistant/server/helpers/process.py

index bd6ca599bf875cd7155101adbba30cf688cf8b01..a0f7240c15eacac6c8f86aff3b0a2c1fa4392d53 100644 (file)
@@ -629,7 +629,7 @@ class StreamsController:
             "ffmpeg",
             "-hide_banner",
             "-loglevel",
-            "verbose" if LOGGER.isEnabledFor(logging.DEBUG) else "quiet",
+            "warning" if LOGGER.isEnabledFor(logging.DEBUG) else "quiet",
             "-ignore_unknown",
         ]
         # input args
index 64186edca1cb09c4876ec9ecdd61a38167ee89e9..89384b3c6d122b9dee4b4e80e37e196bbbccc19b 100644 (file)
@@ -747,7 +747,7 @@ async def _get_ffmpeg_args(
         "ffmpeg",
         "-hide_banner",
         "-loglevel",
-        "verbose" if LOGGER.isEnabledFor(logging.DEBUG) else "quiet",
+        "warning" if LOGGER.isEnabledFor(logging.DEBUG) else "quiet",
         "-ignore_unknown",
     ]
     # collect input args
index fafa623950efa5014c115cf376979c1ce8228325..c928416b39fd03b2b0983d219b41cf08539bc20d 100644 (file)
@@ -114,10 +114,7 @@ class AsyncProcess:
         if self.closed or self._proc.stdin.is_closing():
             return
         self._proc.stdin.write(data)
-        try:
-            await self._proc.stdin.drain()
-        except BrokenPipeError:
-            LOGGER.warning("Attempted write to an already closed process")
+        await self._proc.stdin.drain()
 
     def write_eof(self) -> None:
         """Write end of file to to process stdin."""
@@ -134,7 +131,7 @@ class AsyncProcess:
             ConnectionResetError,
         ):
             # already exited, race condition
-            LOGGER.warning("Attempted write to an already closed process")
+            pass
 
     async def communicate(self, input_data: bytes | None = None) -> tuple[bytes, bytes]:
         """Write bytes to process and read back results."""