static async Task Main(string[] args) { // await BaseUsage.Run(); await DistributedSpider.Run(); Console.Read(); }
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 DistributedSpider.RunAsync(); Console.WriteLine("Bye!"); Environment.Exit(0); }