mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-15 07:43:20 +08:00
不再翻译日志
This commit is contained in:
@@ -89,21 +89,22 @@ public partial class App : Application
|
||||
services.AddSingleton<IMissingTranslationReporter, SupabaseMissingTranslationReporter>();
|
||||
services.AddSingleton<ITranslationService, JsonTranslationService>();
|
||||
|
||||
if ("zh-Hans".Equals(all.OtherConfig.UiCultureInfoName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
services.AddLogging(c => c.AddSerilog());
|
||||
}
|
||||
else
|
||||
{
|
||||
services.AddLogging(logging =>
|
||||
{
|
||||
logging.ClearProviders();
|
||||
logging.SetMinimumLevel(LogLevel.Debug);
|
||||
logging.AddFilter("Microsoft", LogLevel.Warning);
|
||||
logging.AddFilter("Microsoft.Hosting.Lifetime", LogLevel.Warning);
|
||||
logging.Services.AddSingleton<ILoggerProvider, TranslatingSerilogLoggerProvider>();
|
||||
});
|
||||
}
|
||||
// if ("zh-Hans".Equals(all.OtherConfig.UiCultureInfoName, StringComparison.OrdinalIgnoreCase))
|
||||
// {
|
||||
// services.AddLogging(c => c.AddSerilog());
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// services.AddLogging(logging =>
|
||||
// {
|
||||
// logging.ClearProviders();
|
||||
// logging.SetMinimumLevel(LogLevel.Debug);
|
||||
// logging.AddFilter("Microsoft", LogLevel.Warning);
|
||||
// logging.AddFilter("Microsoft.Hosting.Lifetime", LogLevel.Warning);
|
||||
// logging.Services.AddSingleton<ILoggerProvider, TranslatingSerilogLoggerProvider>();
|
||||
// });
|
||||
// }
|
||||
|
||||
services.AddLocalization();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user