Skip to content

Commit 520084c

Browse files
committed
allow a parameter to disable the live-updating nodes display
1 parent 376bcaf commit 520084c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/Build/Logging/TerminalLogger/TerminalLogger.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ public EvalContext(BuildEventContext context)
210210
/// </summary>
211211
private bool? _showSummary;
212212

213+
/// <summary>
214+
/// Indicates whether to show the live-updated nodes display.
215+
/// </summary>
216+
private bool _showNodesDisplay = true;
217+
213218
private uint? _originalConsoleMode;
214219

215220
/// <summary>
@@ -422,6 +427,9 @@ private void ApplyParameter(string parameterName, string? parameterValue)
422427
case "NOSUMMARY":
423428
_showSummary = false;
424429
break;
430+
case "DISABLENODEDISPLAY":
431+
_showNodesDisplay = false;
432+
break
425433
}
426434
}
427435

@@ -488,9 +496,10 @@ public MessageImportance GetMinimumMessageImportance()
488496
/// </summary>
489497
private void BuildStarted(object sender, BuildStartedEventArgs e)
490498
{
491-
if (!_manualRefresh)
499+
if (!_manualRefresh && _showNodesDisplay)
492500
{
493501
_refresher = new Thread(ThreadProc);
502+
_refresher.Name = "Terminal Logger Node Display Refresher";
494503
_refresher.Start();
495504
}
496505

@@ -763,7 +772,10 @@ private void ProjectFinished(object sender, ProjectFinishedEventArgs e)
763772
_buildErrorsCount += project.ErrorCount;
764773
_buildWarningsCount += project.WarningCount;
765774

766-
DisplayNodes();
775+
if (_showNodesDisplay)
776+
{
777+
DisplayNodes();
778+
}
767779
}
768780
finally
769781
{

0 commit comments

Comments
 (0)