replace loggerFactory.AddConsole(); with loggerBuilder.AddConsole();
This commit is contained in:
parent
185a5dcc31
commit
5b36a89772
@ -21,6 +21,12 @@ namespace Ordering.SignalrHub
|
||||
public static IWebHost BuildWebHost(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.UseStartup<Startup>()
|
||||
.ConfigureLogging((hostingContext, builder) =>
|
||||
{
|
||||
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
||||
builder.AddConsole();
|
||||
builder.AddDebug();
|
||||
})
|
||||
.UseSerilog((builderContext, config) =>
|
||||
{
|
||||
config
|
||||
|
@ -120,8 +120,6 @@ namespace Ordering.SignalrHub
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, ILoggingBuilder loggerBuilder)
|
||||
{
|
||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
loggerBuilder.AddDebug();
|
||||
loggerBuilder.AddAzureWebAppDiagnostics();
|
||||
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user