Skip to content

Conversation

@phenning
Copy link
Member

@phenning phenning commented Dec 3, 2025

Uses the same approach as .NET's built-in console formatters by writing ANSI escape codes to the TextWriter

Screenshot 2025-12-03 162921

Uses the same approach as .NET's built-in console formatters by writing ANSI escape codes to the TextWriter
@haileymck
Copy link
Member

I think that some Errors are logged directly too, so they won't always be red with this change


if (colorCode is not null)
{
textWriter.Write(colorCode);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to maintain consistency with AnsiConsole

@phenning
Copy link
Member Author

phenning commented Dec 3, 2025

I think that some Errors are logged directly too, so they won't always be red with this change

It does look like in those case, we are doing things like this?

src\dotnet-scaffolding\dotnet-scaffold\Interactive\Flow\Steps\ParameterDiscovery.cs: AnsiConsole.MarkupLine($"[red]Error with EntraID scaffolding in az cli environment: {azCliError}[/]");?

I do see some cases where we are doing direct Console.WriteLines though - maybe those should be routed through LogError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants