Log to stdout instead of stderr
authorMagnus Hagander <magnus@hagander.net>
Wed, 4 Feb 2015 16:40:01 +0000 (17:40 +0100)
committerMagnus Hagander <magnus@hagander.net>
Wed, 4 Feb 2015 16:40:01 +0000 (17:40 +0100)
This plays nicer with our cronjob outputs

tools/commitfest/check_patches_in_archives.py
tools/commitfest/update_archive_threads.py

index ddbcb0a43c978012cd51bf4cf01f292836212e00..60314db674ba16efb72eb95debac737448e496cc 100755 (executable)
@@ -29,7 +29,8 @@ if __name__ == "__main__":
 
        # Logging always done to stdout, but we can turn on/off how much
        logging.basicConfig(format='%(asctime)s %(levelname)s: %(msg)s',
-                                               level=debug and logging.DEBUG or logging.INFO)
+                                               level=debug and logging.DEBUG or logging.INFO,
+                                               stream=sys.stdout)
 
        socket.setdefaulttimeout(settings.ARCHIVES_TIMEOUT)
        mag = magic.open(magic.MIME)
index bc4208552cdfe61c2f293c5f26d4a942e9ff47f8..d48f21563ee740cf7b61424d372242ebad26c5b7 100755 (executable)
@@ -26,7 +26,8 @@ if __name__ == "__main__":
 
        # Logging always done to stdout, but we can turn on/off how much
        logging.basicConfig(format='%(asctime)s %(levelname)s: %(msg)s',
-                                               level=debug and logging.DEBUG or logging.INFO)
+                                               level=debug and logging.DEBUG or logging.INFO,
+                                               stream=sys.stdout)
 
        logging.debug("Checking for updated mail threads in the archives")
        for thread in MailThread.objects.filter(patches__commitfests__status__in=(1,2,3)).distinct():