Revert "#50575 default case color behaviour is enabled (#74349)" (#74485)
authorMeri Khamoyan <96171496+mkhamoyan@users.noreply.github.com>
Wed, 24 Aug 2022 08:26:21 +0000 (12:26 +0400)
committerGitHub <noreply@github.com>
Wed, 24 Aug 2022 08:26:21 +0000 (12:26 +0400)
This reverts commit ad366f29f2328e67b6274e3888121e11627dd64c.

src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/SimpleConsoleFormatterTests.cs

index 69f7914..4192809 100644 (file)
@@ -13,6 +13,8 @@ namespace Microsoft.Extensions.Logging.Console.Test
         [InlineData(LoggerColorBehavior.Default)]
         [InlineData(LoggerColorBehavior.Enabled)]
         [InlineData(LoggerColorBehavior.Disabled)]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/50575", TestPlatforms.Android)]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/51398", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
         [ActiveIssue("https://github.com/dotnet/runtime/issues/73436", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
         public void Log_WritingScopes_LogsWithCorrectColorsWhenColorEnabled(LoggerColorBehavior colorBehavior)
         {
@@ -32,9 +34,6 @@ namespace Microsoft.Extensions.Logging.Console.Test
                 logger.Log(LogLevel.Information, 0, _state, null, _defaultFormatter);
             }
 
-            // For Android/iOS/tvOS/MacCatalyst default color behavior, enables the color
-            colorBehavior = colorBehavior == LoggerColorBehavior.Default && (PlatformDetection.IsAndroid || PlatformDetection.IsAppleMobile) ? LoggerColorBehavior.Enabled : colorBehavior;
-
             // Assert
             switch (colorBehavior)
             {