Made worker logs available to stdout (#2307)

* Made worker logs available to stdout

* Log Worker Standard out line by line

Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>
This commit is contained in:
Ava Stancu
2022-12-08 22:23:52 +01:00
committed by GitHub
parent 088981a372
commit 369a4eccad
2 changed files with 17 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ namespace GitHub.Runner.Common
string ReadSecret();
void Write(string message, ConsoleColor? colorCode = null);
void WriteLine();
void WriteLine(string line, ConsoleColor? colorCode = null);
void WriteLine(string line, ConsoleColor? colorCode = null, bool skipTracing = false);
void WriteError(Exception ex);
void WriteError(string line);
void WriteSection(string message);
@@ -116,9 +116,12 @@ namespace GitHub.Runner.Common
// Do not add a format string overload. Terminal messages are user facing and therefore
// should be localized. Use the Loc method in the StringUtil class.
public void WriteLine(string line, ConsoleColor? colorCode = null)
public void WriteLine(string line, ConsoleColor? colorCode = null, bool skipTracing = false)
{
Trace.Info($"WRITE LINE: {line}");
if (!skipTracing)
{
Trace.Info($"WRITE LINE: {line}");
}
if (!Silent)
{
if (colorCode != null)