diff --git a/shadowsocks-csharp/Controller/Service/Listener.cs b/shadowsocks-csharp/Controller/Service/Listener.cs index 6a9ab5b1..2627587c 100644 --- a/shadowsocks-csharp/Controller/Service/Listener.cs +++ b/shadowsocks-csharp/Controller/Service/Listener.cs @@ -83,10 +83,7 @@ namespace Shadowsocks.Controller // Start an asynchronous socket to listen for connections. logger.Info($"Shadowsocks started ({UpdateChecker.Version})"); - if (_config.isVerboseLogging) - { - logger.Info(Encryption.EncryptorFactory.DumpRegisteredEncryptor()); - } + logger.Debug(Encryption.EncryptorFactory.DumpRegisteredEncryptor()); _tcpSocket.BeginAccept(new AsyncCallback(AcceptCallback), _tcpSocket); UDPState udpState = new UDPState(_udpSocket); _udpSocket.BeginReceiveFrom(udpState.buffer, 0, udpState.buffer.Length, 0, ref udpState.remoteEndPoint, new AsyncCallback(RecvFromCallback), udpState); diff --git a/shadowsocks-csharp/Controller/Service/TCPRelay.cs b/shadowsocks-csharp/Controller/Service/TCPRelay.cs index e97bfcb0..8327bda9 100644 --- a/shadowsocks-csharp/Controller/Service/TCPRelay.cs +++ b/shadowsocks-csharp/Controller/Service/TCPRelay.cs @@ -472,10 +472,7 @@ namespace Shadowsocks.Controller break; } - if (_config.isVerboseLogging) - { - Logger.Info($"connect to {dstAddr}:{dstPort}"); - } + Logger.Debug($"connect to {dstAddr}:{dstPort}"); _destEndPoint = SocketUtil.GetEndPoint(dstAddr, dstPort); @@ -682,12 +679,9 @@ namespace Shadowsocks.Controller _proxyConnected = true; - if (_config.isVerboseLogging) + if (!(remote is DirectConnect)) { - if (!(remote is DirectConnect)) - { - Logger.Info($"Socket connected to proxy {remote.ProxyEndPoint}"); - } + Logger.Debug($"Socket connected to proxy {remote.ProxyEndPoint}"); } _startConnectTime = DateTime.Now; @@ -758,10 +752,7 @@ namespace Shadowsocks.Controller _destConnected = true; - if (_config.isVerboseLogging) - { - Logger.Info($"Socket connected to ss server: {_server.FriendlyName()}"); - } + Logger.Debug($"Socket connected to ss server: {_server.FriendlyName()}"); var latency = DateTime.Now - _startConnectTime; IStrategy strategy = _controller.GetCurrentStrategy();