修改日志

This commit is contained in:
陈国伟 2021-09-24 08:45:24 +08:00
parent 1a38ff81b8
commit 23b4103695
2 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,7 @@ namespace FastGithub.DomainResolve
/// <returns></returns> /// <returns></returns>
public override string ToString() public override string ToString()
{ {
return this.dns.ToString(); return $"dns://{this.dns}";
} }
} }
} }

View File

@ -192,18 +192,18 @@ namespace FastGithub.DomainResolve
if (address == null) if (address == null)
{ {
this.logger.LogWarning($"dns({dnsClient})解析不到{domain.Host}可用的ip解析"); this.logger.LogWarning($"{dnsClient}解析不到{domain.Host}可用的ip解析");
} }
else else
{ {
this.logger.LogInformation($"dns({dnsClient}): {domain.Host}->{address}"); this.logger.LogInformation($"{dnsClient}: {domain.Host}->{address}");
} }
return address; return address;
} }
catch (Exception ex) catch (Exception ex)
{ {
cancellationToken.ThrowIfCancellationRequested(); cancellationToken.ThrowIfCancellationRequested();
this.logger.LogWarning($"dns({dnsClient})无法解析{domain.Host}{ex.Message}"); this.logger.LogWarning($"{dnsClient}无法解析{domain.Host}{ex.Message}");
return default; return default;
} }
} }