Program.cs 918 B

123456789101112131415161718192021222324252627282930
  1. using Microsoft.AspNetCore.Hosting;
  2. using Microsoft.Extensions.Hosting;
  3. using Microsoft.Extensions.Logging;
  4. namespace ProductionLineMonitor.Web
  5. {
  6. public class Program
  7. {
  8. public static void Main(string[] args)
  9. {
  10. CreateHostBuilder(args).Build().Run();
  11. }
  12. public static IHostBuilder CreateHostBuilder(string[] args) =>
  13. Host.CreateDefaultBuilder(args)
  14. .ConfigureLogging(log =>
  15. {
  16. log.AddFilter("System", LogLevel.Warning);
  17. log.AddFilter("Microsoft", LogLevel.Warning);
  18. log.AddLog4Net();
  19. })
  20. .ConfigureWebHostDefaults(webBuilder =>
  21. {
  22. webBuilder
  23. .UseIISIntegration()
  24. .UseStartup<Startup>()
  25. .UseUrls();
  26. });
  27. }
  28. }