This commit is contained in:
陈国伟 2021-08-03 14:18:49 +08:00
commit 049ea9812e
6 changed files with 6 additions and 5 deletions

View File

@ -72,7 +72,7 @@ namespace FastGithub.DomainResolve
} }
catch (Exception) catch (Exception)
{ {
this.logger.LogTrace($"由于{pureDns}解析{domain}失败,本次使用{fastDns}"); this.logger.LogWarning($"由于{pureDns}解析{domain}失败,本次使用{fastDns}");
return await LookupCoreAsync(fastDns, domain, cancellationToken); return await LookupCoreAsync(fastDns, domain, cancellationToken);
} }
} }

View File

@ -23,7 +23,6 @@ namespace FastGithub.Http
public HttpClient(DomainConfig domainConfig, IDomainResolver domainResolver) public HttpClient(DomainConfig domainConfig, IDomainResolver domainResolver)
: this(domainConfig, new HttpClientHandler(domainResolver), disposeHandler: true) : this(domainConfig, new HttpClientHandler(domainResolver), disposeHandler: true)
{ {
this.domainConfig = domainConfig;
} }
/// <summary> /// <summary>

View File

@ -60,7 +60,7 @@ namespace FastGithub.ReverseProxy
} }
else else
{ {
this.logger.LogError($"{message}{Environment.NewLine}{exception.Message}"); this.logger.LogError($"{message}{Environment.NewLine}{exception}");
} }
} }
} }

View File

@ -105,7 +105,7 @@ namespace FastGithub.ReverseProxy
await context.Response.WriteAsJsonAsync(new await context.Response.WriteAsJsonAsync(new
{ {
error = error.ToString(), error = error.ToString(),
message = errorFeature.Exception?.ToString() message = errorFeature.Exception?.Message
}); });
} }
} }

View File

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using System;
using System.IO; using System.IO;
namespace FastGithub namespace FastGithub
@ -41,6 +42,7 @@ namespace FastGithub
.ConfigureWebHostDefaults(webBuilder => .ConfigureWebHostDefaults(webBuilder =>
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
webBuilder.UseShutdownTimeout(TimeSpan.FromSeconds(2d));
webBuilder.UseKestrel(kestrel => webBuilder.UseKestrel(kestrel =>
{ {
kestrel.ListenHttpReverseProxy(); kestrel.ListenHttpReverseProxy();

View File

@ -30,7 +30,7 @@
"Yarp": "Warning", "Yarp": "Warning",
"System": "Warning", "System": "Warning",
"Microsoft": "Warning", "Microsoft": "Warning",
"Microsoft.AspNetCore.Server.Kestrel": "None" "Microsoft.AspNetCore.Server.Kestrel": "Error"
} }
} }
} }