Add verbose logging to log every connection

Note:
- Added a configuration entry, user should add this
  by hand or reset from scratch.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
Syrone Wong
2016-08-08 10:33:17 +08:00
parent f21c534704
commit fb3fcdb90d
5 changed files with 34 additions and 4 deletions
@@ -68,6 +68,7 @@ namespace Shadowsocks.Controller
public event EventHandler EnableStatusChanged;
public event EventHandler EnableGlobalChanged;
public event EventHandler ShareOverLANStatusChanged;
public event EventHandler VerboseLoggingStatusChanged;
public event EventHandler TrafficChanged;
// when user clicked Edit PAC, and PAC file has already created
@@ -212,6 +213,15 @@ namespace Shadowsocks.Controller
}
}
public void ToggleVerboseLogging(bool enabled)
{
_config.isVerboseLogging = enabled;
SaveConfig(_config);
if ( VerboseLoggingStatusChanged != null ) {
VerboseLoggingStatusChanged(this, new EventArgs());
}
}
public void SelectServerIndex(int index)
{
_config.index = index;