From 3f15cc67105068c47743e8719c0e131dac9abb83 Mon Sep 17 00:00:00 2001 From: Noah Falk Date: Fri, 6 Aug 2021 17:50:18 -0700 Subject: [PATCH] Fix dotnet-counters console alignment (#2485) Text was oddly shifting one character to the right during updates. Fixed the off-by-one error in the update text positioning. --- src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs b/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs index c1c36f154..de578d503 100644 --- a/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs +++ b/src/Tools/dotnet-counters/Exporters/ConsoleWriter.cs @@ -114,7 +114,7 @@ namespace Microsoft.Diagnostics.Tools.Counters.Exporters counter.Row = row++; if (counter.RenderValueInline) { - Console.WriteLine($"{name}{FormatValue(counter.LastValue)}"); + Console.WriteLine($"{name} {FormatValue(counter.LastValue)}"); } else { @@ -122,7 +122,7 @@ namespace Microsoft.Diagnostics.Tools.Counters.Exporters foreach (ObservedTagSet tagSet in counter.TagSets.Values.OrderBy(t => t.Tags)) { string tagName = MakeFixedWidth($"{new string(' ', 2 * Indent)}{tagSet.Tags}", Indent + maxNameLength); - Console.WriteLine($"{tagName}{FormatValue(tagSet.LastValue)}"); + Console.WriteLine($"{tagName} {FormatValue(tagSet.LastValue)}"); tagSet.Row = row++; } } -- 2.34.1