Browse Source

fix calling obsolete logging for ApplicationInsights

pull/992/head
Rafsanul Hasan 5 years ago
parent
commit
1e7873dc80
No known key found for this signature in database GPG Key ID: 4BBF45E04D0AD72B
2 changed files with 5 additions and 4 deletions
  1. +2
    -2
      src/Services/Webhooks/Webhooks.API/Startup.cs
  2. +3
    -2
      src/Web/WebSPA/Startup.cs

+ 2
- 2
src/Services/Webhooks/Webhooks.API/Startup.cs 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"];


+ 3
- 2
src/Web/WebSPA/Startup.cs 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())
{


Loading…
Cancel
Save