aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/mlog.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
index ae8c7a3..7080960 100644
--- a/mesonbuild/mlog.py
+++ b/mesonbuild/mlog.py
@@ -422,7 +422,13 @@ def exception(e: Exception, prefix: T.Optional[AnsiDecorator] = None) -> None:
if prefix:
args.append(prefix)
args.append(str(e))
- log(*args)
+
+ restore = log_disable_stdout
+ if restore:
+ enable()
+ log(*args, is_error=True)
+ if restore:
+ disable()
# Format a list for logging purposes as a string. It separates
# all but the last item with commas, and the last with 'and'.