From 48ab9a8995fc563dfd13a34f6c81d3f7d040a04c Mon Sep 17 00:00:00 2001 From: henning Date: Thu, 27 Feb 2020 15:33:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=BB=E6=89=BE=E9=80=82?= =?UTF-8?q?=E9=85=8D=E5=99=A8=E7=9A=84logging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Netch/Utils/Configuration.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Netch/Utils/Configuration.cs b/Netch/Utils/Configuration.cs index 67cf0b5e..505de365 100644 --- a/Netch/Utils/Configuration.cs +++ b/Netch/Utils/Configuration.cs @@ -105,11 +105,13 @@ namespace Netch.Utils return false; } + Logging.Info($"搜索适配器index:{Global.Adapter.Index}"); var AddressGot = false; foreach (var adapter in NetworkInterface.GetAllNetworkInterfaces()) { var adapterProperties = adapter.GetIPProperties(); var p = adapterProperties.GetIPv4Properties(); + Logging.Info($"检测适配器:{adapter.Name} {adapter.Id} {adapter.Description}, index: {p.Index}"); // 通过索引查找对应适配器的 IPv4 地址 if (p.Index == Global.Adapter.Index) @@ -144,7 +146,7 @@ namespace Netch.Utils if (!AddressGot) { - Logging.Info("无法找到ipv4地址"); + Logging.Info("无法找到当前使用适配器"); return false; }