static async Task Main(string[] args) { Log.Logger = new LoggerConfiguration() .MinimumLevel.Information() .MinimumLevel.Override("Microsoft.Hosting.Lifetime", LogEventLevel.Warning) .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) .MinimumLevel.Override("System", LogEventLevel.Warning) .MinimumLevel.Override("Microsoft.AspNetCore.Authentication", LogEventLevel.Warning) .Enrich.FromLogContext() .WriteTo.Console().WriteTo.RollingFile("logs/spider.txt") .CreateLogger(); await EntitySpider.RunAsync(); Console.WriteLine("Bye!"); Environment.Exit(0); }
static async Task Main(string[] args) { ThreadPool.SetMaxThreads(255, 255); ThreadPool.SetMinThreads(255, 255); Log.Logger = new LoggerConfiguration() .MinimumLevel.Information() .MinimumLevel.Override("Microsoft.Hosting.Lifetime", LogEventLevel.Warning) .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) .MinimumLevel.Override("System", LogEventLevel.Warning) .MinimumLevel.Override("Microsoft.AspNetCore.Authentication", LogEventLevel.Warning) .Enrich.FromLogContext() .WriteTo.Console().WriteTo.RollingFile("logs/spider.log") .CreateLogger(); // // await DistributedSpider.RunAsync(); // await ProxySpider.RunAsync(); // await EntitySpider.RunMySqlQueueAsync(); await EntitySpider.RunAsync(); Console.WriteLine("Bye!"); }