Add indentation per initial mock-ups

This commit is contained in:
Ladi Prosek 2023-03-29 11:51:27 +02:00
Родитель a9cf5c8aba
Коммит 847b58cff9
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -36,10 +36,15 @@ internal sealed class LiveLogger : INodeLogger
{
public override string ToString()
{
return $"{Project} {Target} ({Stopwatch.Elapsed.TotalSeconds:F1}s)";
return $"{Indentation}{Project} {Target} ({Stopwatch.Elapsed.TotalSeconds:F1}s)";
}
}
/// <summary>
/// The indentation to use for all build output.
/// </summary>
private const string Indentation = " ";
/// <summary>
/// Protects access to state shared between the logger callbacks and the rendering thread.
/// </summary>
@ -316,6 +321,8 @@ internal sealed class LiveLogger : INodeLogger
double duration = project.Stopwatch.Elapsed.TotalSeconds;
ReadOnlyMemory<char>? outputPath = project.OutputPath;
Terminal.Write(Indentation);
if (e.ProjectFile is not null)
{
string projectFile = Path.GetFileName(e.ProjectFile) ?? e.ProjectFile;
@ -367,7 +374,7 @@ internal sealed class LiveLogger : INodeLogger
MessageSeverity.Error => TerminalColor.Red,
_ => TerminalColor.Default,
};
Terminal.WriteColorLine(color, $" {buildMessage.Message}");
Terminal.WriteColorLine(color, $"{Indentation}{Indentation}{buildMessage.Message}");
}
}