aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-03-23 21:01:35 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-03-23 21:03:50 +0300
commitff61b237321cdba1dd7c90a0b3bf0d66f7cf1651 (patch)
tree616f3651fcc067eb55aa6740d32ea4c25a5f6acf
parentproject.boost: refactoring (diff)
downloadcmake-common-ff61b237321cdba1dd7c90a0b3bf0d66f7cf1651.tar.gz
cmake-common-ff61b237321cdba1dd7c90a0b3bf0d66f7cf1651.zip
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).
-rw-r--r--project/utils.py6
1 files changed, 5 insertions, 1 deletions
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: