Skip to content

Instantly share code, notes, and snippets.

@kadukf
Created January 8, 2020 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kadukf/1d17908b195ce4155c5f97168741a095 to your computer and use it in GitHub Desktop.
Save kadukf/1d17908b195ce4155c5f97168741a095 to your computer and use it in GitHub Desktop.
Setup of scope filtering
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