From f7ed95381521d350324f4b1c1884254f2a312237 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Mon, 18 Feb 2013 15:59:08 -0800 Subject: [PATCH] log last details. --- TorrentToMedia.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 6d9b9b60..7ffd64ea 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -364,8 +364,13 @@ if status == 0: else: Logger.info("calling autoProcess script for failed download") ## Now we pass off to CouchPotato or SickBeard. -# still need to figure out how to log this output. +## log this output. +old_stdout = sys.stdout ## Still crude, but we wat to capture this for now. +log_file = open(logFile,"a+") +sys.stdout = log_file if Category == Movie_Cat: autoProcessMovie.process(destination, Name, status) elif Category == TV_Cat: autoProcessTV.processEpisode(destination, Name, status) +sys.stdout = old_stdout +log_file.close()