From 64548dde4da842945ed926792ec03d6e86812ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E6=98=9F=E7=B9=81?= Date: Tue, 14 Feb 2023 11:17:07 +0800 Subject: [PATCH] feat: remove serilog injector --- .../SerilogInjector.cs | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/SerilogInjector.cs diff --git a/src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/SerilogInjector.cs b/src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/SerilogInjector.cs deleted file mode 100644 index bc686c7..0000000 --- a/src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/SerilogInjector.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Serilog; - -// ReSharper disable once CheckNamespace -namespace Microsoft.Extensions.Hosting; - -/// -/// 注入 Serilog 的扩展方法。 -/// -public static class SerilogInjector -{ - /// - /// 添加 Serilog - /// - /// - /// - public static IHostBuilder UseCnblogsSerilog(this WebApplicationBuilder builder) - { - return builder.Host.UseCnblogsSerilog(); - } - - /// - /// 添加 Serilog - /// - /// - /// - public static IHostBuilder UseCnblogsSerilog(this IHostBuilder host) - { - return host.UseSerilog((ctx, conf) => conf.ReadFrom.Configuration(ctx.Configuration).Enrich.FromLogContext()); - } -} \ No newline at end of file