From: Marcel van der Veldt Date: Sat, 1 Apr 2023 22:43:55 +0000 (+0200) Subject: change log levels X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=2b6cc4aa7c502a8dc18de95b1175a9d9c3f73524;p=music-assistant-server.git change log levels --- diff --git a/music_assistant/server/controllers/streams.py b/music_assistant/server/controllers/streams.py index bd6ca599..a0f7240c 100644 --- a/music_assistant/server/controllers/streams.py +++ b/music_assistant/server/controllers/streams.py @@ -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 diff --git a/music_assistant/server/helpers/audio.py b/music_assistant/server/helpers/audio.py index 64186edc..89384b3c 100644 --- a/music_assistant/server/helpers/audio.py +++ b/music_assistant/server/helpers/audio.py @@ -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 diff --git a/music_assistant/server/helpers/process.py b/music_assistant/server/helpers/process.py index fafa6239..c928416b 100644 --- a/music_assistant/server/helpers/process.py +++ b/music_assistant/server/helpers/process.py @@ -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."""