From ff61b237321cdba1dd7c90a0b3bf0d66f7cf1651 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 23 Mar 2021 21:01:35 +0300 Subject: project.utils: log to stdout, not stderr This is a quick fix to the interleaved output issue I'm having on CI runs (when the logging output gets interleaved with subprocess output). --- project/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'project/utils.py') diff --git a/project/utils.py b/project/utils.py index 8485dfa..868592a 100644 --- a/project/utils.py +++ b/project/utils.py @@ -8,6 +8,7 @@ import functools import logging import os.path import subprocess +import sys import tempfile import time @@ -25,7 +26,10 @@ def setup_logging(): logging.basicConfig( format='%(asctime)s | %(levelname)s | %(message)s', datefmt='%Y-%m-%d %H:%M:%S', - level=logging.INFO) + level=logging.INFO, + # Log to stdout, because that's where subprocess's output goes (so that + # they don't get interleaved). + stream=sys.stdout) try: yield except Exception as e: -- cgit v1.2.3