diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/ILoggingBuilderExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/ILoggingBuilderExtensions.cs index 474e6d82fa..45064824a0 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/ILoggingBuilderExtensions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/ILoggingBuilderExtensions.cs @@ -13,8 +13,6 @@ public static ILoggingBuilder AddDiagnosticLogger(this ILoggingBuilder builder) public static ILoggingBuilder ConfigureLoggers(this ILoggingBuilder loggingBuilder) { - loggingBuilder.ClearProviders(); - if (AppEnvironment.IsDev()) { loggingBuilder.AddDebug(); @@ -22,9 +20,8 @@ public static ILoggingBuilder ConfigureLoggers(this ILoggingBuilder loggingBuild if (!AppPlatform.IsBrowser) { + // Browser has its own BrowserConsoleLogger. loggingBuilder.AddConsole(); - // DiagnosticLogger is already logging in browser's console. - // But Console logger is still useful in Visual Studio's Device Log (Android, iOS) or BrowserStack etc. } loggingBuilder.AddDiagnosticLogger(); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Program.Services.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Program.Services.cs index 0a9b133850..445b900fa5 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Program.Services.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Program.Services.cs @@ -42,10 +42,7 @@ public static void AddClientWindowsProjectServices(this IServiceCollection servi loggingBuilder.AddConfiguration(configuration.GetSection("Logging")); loggingBuilder.AddEventSourceLogger(); - if (AppPlatform.IsWindows) - { - loggingBuilder.AddEventLog(); - } + loggingBuilder.AddEventLog(); //#if (appCenter == true) if (Microsoft.AppCenter.AppCenter.Configured) {