Created
January 8, 2020 09:44
-
-
Save kadukf/1d17908b195ce4155c5f97168741a095 to your computer and use it in GitHub Desktop.
Setup of scope filtering
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
CreateWebHostBuilder(args).Build().Run(); | |
} | |
public static IWebHostBuilder CreateWebHostBuilder(string[] args) => | |
WebHost | |
.CreateDefaultBuilder(args) | |
.ConfigureLogging((context, loggingBuilder) => | |
{ | |
loggingBuilder.ClearProviders(); | |
loggingBuilder.AddConsole(s => s.IncludeScopes = true); | |
loggingBuilder.UseScopeFiltering(); | |
}) | |
.UseStartup<Startup>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment