Improved debug info output by using isVerboseLogging

This commit is contained in:
Noisyfox He
2016-08-08 22:24:00 +10:00
parent 6a3e06cdb3
commit e23641c522
@@ -445,7 +445,13 @@ namespace Shadowsocks.Controller
_proxyConnected = true;
Logging.Debug($"Socket connected to proxy {remote.ProxyEndPoint}");
if (_config.isVerboseLogging)
{
if (!(remote is DirectConnect))
{
Logging.Info($"Socket connected to proxy {remote.ProxyEndPoint}");
}
}
_startConnectTime = DateTime.Now;
ServerTimer connectTimer = new ServerTimer(3000);
@@ -511,6 +517,11 @@ namespace Shadowsocks.Controller
_destConnected = true;
if (_config.isVerboseLogging)
{
Logging.Info($"Socket connected to ss server {remote.DestEndPoint}");
}
var latency = DateTime.Now - _startConnectTime;
IStrategy strategy = controller.GetCurrentStrategy();
strategy?.UpdateLatency(server, latency);