浏览代码

Bug 1936: Setting the logging level to -1 (Reduced) does not work in .NET assembly

https://winscp.net/tracker/1936

Source commit: 8641a5952d8b8d66cae7413f1f5344ce17c39c1c
Martin Prikryl 4 年之前
父节点
当前提交
8ab9ca149d
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      dotnet/internal/ExeSessionProcess.cs
  2. 1 1
      dotnet/internal/Logger.cs

+ 1 - 1
dotnet/internal/ExeSessionProcess.cs

@@ -93,7 +93,7 @@ namespace WinSCP
                 }
 
                 string logLevelSwitch = null;
-                if (_session.DebugLogLevel > 0)
+                if (_session.DebugLogLevel != 0)
                 {
                     logLevelSwitch = string.Format(CultureInfo.InvariantCulture, "/loglevel={0} ", _session.DebugLogLevel);
                 }

+ 1 - 1
dotnet/internal/Logger.cs

@@ -407,7 +407,7 @@ namespace WinSCP
         {
             if ((value < -1) || (value > 2))
             {
-                throw WriteException(new ArgumentOutOfRangeException(string.Format(CultureInfo.CurrentCulture, "Logging level has to be in range 0-2")));
+                throw WriteException(new ArgumentOutOfRangeException(string.Format(CultureInfo.CurrentCulture, "Logging level has to be in range -1 to 2")));
             }
             _logLevel = value;
         }