internal static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup <Startup>(); }) .UseSerilog((context, loggerConfiguration) => { SerilogToEsExtensions.SetSerilogConfiguration( loggerConfiguration, context.Configuration); }) .UseAutofac();
public static IHostBuilder CreateHostBuilder(string[] args) => Microsoft.Extensions.Hosting.Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup <Startup>(); }) .ConfigureAppConfiguration((context, builder) => { // ÅäÖÃnacos builder.AddNacosConfiguration(builder.Build().GetSection("NacosConfig")); }) .UseSerilog((context, loggerConfiguration) => { SerilogToEsExtensions.SetSerilogConfiguration( loggerConfiguration, context.Configuration); }).UseAutofac();