Program.cs 462 B

12345678910111213
  1. Serve.Run(RunOptions.Default.AddWebComponent<WebComponent>());
  2. public class WebComponent : IWebComponent
  3. {
  4. public void Load(WebApplicationBuilder builder, ComponentContext componentContext)
  5. {
  6. // ÈÕÖ¾¹ýÂË
  7. builder.Logging.AddFilter((provider, category, logLevel) =>
  8. {
  9. return !new[] { "Microsoft.Hosting", "Microsoft.AspNetCore" }.Any(u => category.StartsWith(u)) && logLevel >= LogLevel.Information;
  10. });
  11. }
  12. }