We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd33a09 commit 7588b13Copy full SHA for 7588b13
src/LCT.Common/Logging/LoggerHelper.cs
@@ -49,14 +49,9 @@ private static int GetAutoConsoleWidth()
49
50
try
51
{
52
- if (Console.IsOutputRedirected)
53
- return 120;
54
-
55
- int width = Console.WindowWidth;
56
57
- if (width <= 0) return 160;
58
- if (width < 100) return 160;
59
- if (width > 240) return 240;
+ int width = Console.IsOutputRedirected ? 160 : Console.WindowWidth;
+ if (width < 100) width = 160;
+ if (width > 240) width = 240;
60
return width;
61
}
62
catch (InvalidOperationException ex)
0 commit comments