diff --git a/FastGithub.Dns/HostsValidator.cs b/FastGithub.Dns/HostsValidator.cs index 31e954a..e3aae79 100644 --- a/FastGithub.Dns/HostsValidator.cs +++ b/FastGithub.Dns/HostsValidator.cs @@ -67,7 +67,7 @@ namespace FastGithub.Dns } if (this.fastGithubConfig.IsMatch(record.Domain)) { - this.logger.LogError($"由于你的hosts文件设置了[{record.Domain}->{record.Address}],{nameof(FastGithub)}无法加速此域名"); + this.logger.LogError($"由于你的hosts文件设置了{record},{nameof(FastGithub)}无法加速此域名"); } } } @@ -94,6 +94,11 @@ namespace FastGithub.Dns this.Address = address; } + public override string ToString() + { + return $"[{this.Domain}->{this.Address}]"; + } + public static bool TryParse(string record, [MaybeNullWhen(false)] out HostsRecord value) { value = null;