未验证 提交 ad366f29 编写于 作者: M Meri Khamoyan 提交者: GitHub

#50575 default case color behaviour is enabled (#74349)

* #50575 color behaviour by default is enabled on android/applemobile 
上级 9528e6f5
......@@ -13,8 +13,6 @@ public class SimpleConsoleFormatterTests : ConsoleFormatterTests
[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)
{
......@@ -34,6 +32,9 @@ public void Log_WritingScopes_LogsWithCorrectColorsWhenColorEnabled(LoggerColorB
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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册