Skip to content

Commit

Permalink
TW-72330 Sometimes build log skips errors from .NET runner
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov authored and NikolayPianikov committed Aug 4, 2021
1 parent a3cf9f6 commit 81e5071
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 5 additions & 1 deletion TeamCity.MSBuild.Logger/DefaultConsole.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
namespace TeamCity.MSBuild.Logger
{
using System;
using System.IO;
using System.Threading;
using JetBrains.Annotations;

// ReSharper disable once ClassNeverInstantiated.Global
internal class DefaultConsole : IConsole
{
[NotNull] private readonly IDiagnostics _diagnostics;
[NotNull] private readonly TextWriter _out;
// ReSharper disable once IdentifierTypo
private int _reentrancy;

public DefaultConsole([NotNull] IDiagnostics diagnostics)
{
_diagnostics = diagnostics ?? throw new ArgumentNullException(nameof(diagnostics));
// https://youtrack.jetbrains.com/issue/TW-72330
_out = Console.Out;
}

public void Write(string text)
Expand All @@ -26,7 +30,7 @@ public void Write(string text)
_diagnostics.Send(() => $"[{reentrancy} +] Write({text.Trim()})");
try
{
Console.Write(text);
_out.Write(text);
}
finally
{
Expand Down
10 changes: 0 additions & 10 deletions TeamCity.MSBuild.Logger/Properties/launchSettings.json

This file was deleted.

0 comments on commit 81e5071

Please sign in to comment.