forked from xoofx/UnityNuGet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Immediately display logs on tests to see progress in real time (xoofx…
…#333) * Immediately display logs on tests to see progress in real time * WIP a * WIP --------- Co-authored-by: Borja Domínguez Vázquez <[email protected]>
- Loading branch information
1 parent
9170ecc
commit ad10241
Showing
5 changed files
with
33 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Threading.Tasks; | ||
using NuGet.Common; | ||
using NUnit.Framework; | ||
|
||
namespace UnityNuGet.Tests | ||
{ | ||
public class NuGetConsoleTestLogger : LoggerBase | ||
{ | ||
public override void Log(ILogMessage message) | ||
{ | ||
if (message.Level == LogLevel.Error) | ||
{ | ||
TestContext.Error.WriteLine(message); | ||
} | ||
else | ||
{ | ||
TestContext.Progress.WriteLine(message); | ||
} | ||
} | ||
|
||
public override Task LogAsync(ILogMessage message) | ||
{ | ||
Log(message); | ||
return Task.CompletedTask; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters