Skip to content

Commit

Permalink
Improve logging output on GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Feb 25, 2022
1 parent 683a285 commit 9481a30
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/dotnet-releaser/Logging/ISimpleLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ private class SimpleLoggerRedirect : ISimpleLogger
{
private readonly ILogger _log;
private int _logId;
private int _group;
private bool _runningFromGitHubAction;
private readonly bool _runningFromGitHubAction;

public SimpleLoggerRedirect(ILogger log)
{
Expand All @@ -77,11 +76,6 @@ public void LogStartGroup(string name)
AnsiConsole.WriteLine($"::group::{name}");
}

if (_group > 0)
{
AnsiConsole.WriteLine();
}
_group++;
AnsiConsole.Write(new Rule(name) { Alignment = Justify.Left });
Console.Out.Flush();
}
Expand All @@ -91,6 +85,7 @@ public void LogEndGroup()
if (_runningFromGitHubAction)
{
AnsiConsole.WriteLine("::endgroup::");
AnsiConsole.WriteLine();
}
Console.Out.Flush();
}
Expand Down

0 comments on commit 9481a30

Please sign in to comment.