From c93e1d58d4a1b5d1b68c23b36a9d2ba6c8aba693 Mon Sep 17 00:00:00 2001 From: celeron533 Date: Sat, 25 Jan 2020 15:57:22 +0800 Subject: [PATCH] Not using isVerboseLogging flag --- .../Controller/Service/Listener.cs | 5 +---- .../Controller/Service/TCPRelay.cs | 17 ++++------------- 2 files changed, 5 insertions(+), 17 deletions(-) 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();