From edd29ed3b880a23aeb1ef2fa80709c4dedc6f1fe Mon Sep 17 00:00:00 2001 From: 10se1ucgo Date: Sun, 13 Mar 2016 13:59:25 -0400 Subject: [PATCH] Oops, logger would not catch output this way. --- ffmpeg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ffmpeg.py b/ffmpeg.py index 990fa47..c969c90 100644 --- a/ffmpeg.py +++ b/ffmpeg.py @@ -179,7 +179,9 @@ def run(self): vol=self.vol)) try: logger.info(convert_audio(track, file, self.rate, self.vol)) - except subprocess.CalledProcessError: + except subprocess.CalledProcessError as e: + logging.exception("FFmpeg converter: Couldn't convert {track}".format(track=track)) + logging.critical("FFmpeg converter: Error output log\n" + e.output.decode('ascii', 'replace')) errors.append(track) # File's headers aren't stripped, which normally would increase self.converted by 1. self.converted += 1