fix calling obsolete logging for ApplicationInsights

This commit is contained in:
Rafsanul Hasan 2019-04-04 15:33:59 +06:00
parent b41be28a16
commit 1e7873dc80
No known key found for this signature in database
GPG Key ID: 4BBF45E04D0AD72B
2 changed files with 5 additions and 4 deletions

View File

@ -70,9 +70,9 @@ namespace Webhooks.API
return new AutofacServiceProvider(container.Build());
}
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, ILoggingBuilder loggingBuilder)
{
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
ApplicationInsightsLoggingBuilderExtensions.AddApplicationInsights(loggingBuilder, options => options.IncludeScopes = true);
var pathBase = Configuration["PATH_BASE"];

View File

@ -17,6 +17,7 @@ using WebSPA.Infrastructure;
using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Logging.ApplicationInsights;
namespace eShopConContainers.WebSPA
{
@ -73,9 +74,9 @@ namespace eShopConContainers.WebSPA
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IAntiforgery antiforgery)
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, ILoggingBuilder loggingBuilder, IAntiforgery antiforgery)
{
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
ApplicationInsightsLoggingBuilderExtensions.AddApplicationInsights(loggingBuilder, options => options.IncludeScopes = true);
if (env.IsDevelopment())
{