Browse Source

Change EF Core log level to warning on the startup templates

pull/5741/head
Halil İbrahim Kalkan 6 years ago
parent
commit
50fe577a8a
  1. 1
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/Program.cs
  2. 1
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/Program.cs
  3. 1
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/Program.cs

1
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/Program.cs

@ -17,6 +17,7 @@ namespace MyCompanyName.MyProjectName
.MinimumLevel.Information() .MinimumLevel.Information()
#endif #endif
.MinimumLevel.Override("Microsoft", LogEventLevel.Information) .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext() .Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt")) .WriteTo.Async(c => c.File("Logs/logs.txt"))
#if DEBUG #if DEBUG

1
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/Program.cs

@ -17,6 +17,7 @@ namespace MyCompanyName.MyProjectName
.MinimumLevel.Information() .MinimumLevel.Information()
#endif #endif
.MinimumLevel.Override("Microsoft", LogEventLevel.Information) .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext() .Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt")) .WriteTo.Async(c => c.File("Logs/logs.txt"))
#if DEBUG #if DEBUG

1
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/Program.cs

@ -17,6 +17,7 @@ namespace MyCompanyName.MyProjectName
.MinimumLevel.Information() .MinimumLevel.Information()
#endif #endif
.MinimumLevel.Override("Microsoft", LogEventLevel.Information) .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext() .Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt")) .WriteTo.Async(c => c.File("Logs/logs.txt"))
#if DEBUG #if DEBUG

Loading…
Cancel
Save