调整DNS日志等级

This commit is contained in:
陈国伟 2021-09-29 15:17:36 +08:00
parent d9afb0e25a
commit 889de3185c
2 changed files with 6 additions and 0 deletions

View File

@ -188,6 +188,11 @@ namespace FastGithub.DomainResolve
return result.Addresses; return result.Addresses;
} }
catch (OperationCanceledException)
{
this.logger.LogInformation($"dns://{dns}无法解析{domain}:请求超时");
return Array.Empty<IPAddress>();
}
catch (Exception ex) catch (Exception ex)
{ {
this.logger.LogWarning($"dns://{dns}无法解析{domain}{ex.Message}"); this.logger.LogWarning($"dns://{dns}无法解析{domain}{ex.Message}");

View File

@ -29,6 +29,7 @@
"Yarp": "Warning", "Yarp": "Warning",
"System": "Warning", "System": "Warning",
"Microsoft": "Warning", "Microsoft": "Warning",
"FastGithub.DomainResolve": "Warning",
"Microsoft.AspNetCore.Server.Kestrel": "Error" "Microsoft.AspNetCore.Server.Kestrel": "Error"
} }
} }