in tool/TeamCity.Docker/ConsoleLogger.cs [20:57]
public void Log(string text, Result result = Result.Success)
{
if (text == null)
{
throw new ArgumentNullException(nameof(text));
}
lock (_lockObject)
{
var foregroundColor = Console.ForegroundColor;
try
{
switch (result)
{
case Result.Error:
Console.ForegroundColor = ConsoleColor.Red;
break;
case Result.Warning:
Console.ForegroundColor = ConsoleColor.Yellow;
break;
}
var prefix = new string(Enumerable.Repeat(' ', _blockCount << 1).ToArray());
if (result == Result.Error)
{
Console.Error.WriteLine(prefix + text);
}
else
{
Console.WriteLine(prefix + text);
}
}
finally
{
Console.ForegroundColor = foregroundColor;
}
}
}