aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mlog.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-02-25 10:29:47 -0500
committerXavier Claessens <xavier.claessens@collabora.com>2020-02-26 14:24:12 -0500
commit8101b0ddab1dea8de3b2588a4b75da525865c404 (patch)
tree0464532a0a29a382f92ad6490c6b4d7a3b4a4483 /mesonbuild/mlog.py
parentc175e97a8862be5c87196aa94cb911975c84cf84 (diff)
downloadmeson-8101b0ddab1dea8de3b2588a4b75da525865c404.zip
meson-8101b0ddab1dea8de3b2588a4b75da525865c404.tar.gz
meson-8101b0ddab1dea8de3b2588a4b75da525865c404.tar.bz2
summary: Add more info in Subprojects section
This adds a warnings counter for subprojects that passed. This is to encourage developpers to check warnings in the logs and hopefully fix them. Otherwise they could be hidden in hundreds lines of logs. This also print the error message for subprojects that did not pass. The error message is often enough to fix the issue (e.g. missing dependency) and it's easier than searching in the logs why a subproject failed.
Diffstat (limited to 'mesonbuild/mlog.py')
-rw-r--r--mesonbuild/mlog.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
index b28eca1..ecd93f3 100644
--- a/mesonbuild/mlog.py
+++ b/mesonbuild/mlog.py
@@ -59,6 +59,7 @@ log_disable_stdout = False # type: bool
log_errors_only = False # type: bool
_in_ci = 'CI' in os.environ # type: bool
_logged_once = set() # type: T.Set[T.Tuple[str, ...]]
+log_warnings_counter = 0 # type: int
def disable() -> None:
global log_disable_stdout
@@ -254,6 +255,9 @@ def _log_error(severity: str, *rargs: T.Union[str, AnsiDecorator],
else:
log(*args, **kwargs)
+ global log_warnings_counter
+ log_warnings_counter += 1
+
if log_fatal_warnings:
raise MesonException("Fatal warnings enabled, aborting")