Skip to content

Commit 7ba3d66

Browse files
committed
Fix for issue #1178 based on fix in PR #1214 for version 3.17++
1 parent 685c5b5 commit 7ba3d66

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/NUnitConsole/nunit3-console/Program.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,12 @@ public static int Main(string[] args)
106106
if (Options.WorkDirectory != null)
107107
engine.WorkDirectory = Options.WorkDirectory;
108108

109-
if (Options.InternalTraceLevel != null)
110-
engine.InternalTraceLevel = (InternalTraceLevel)Enum.Parse(typeof(InternalTraceLevel), Options.InternalTraceLevel);
109+
//if (Options.InternalTraceLevel != null)
110+
// engine.InternalTraceLevel = (InternalTraceLevel)Enum.Parse(typeof(InternalTraceLevel), Options.InternalTraceLevel);
111+
// See PR 1114 https://github.com/nunit/nunit-console/pull/1214/files
112+
engine.InternalTraceLevel = Options.InternalTraceLevel != null
113+
? (InternalTraceLevel)Enum.Parse(typeof(InternalTraceLevel), Options.InternalTraceLevel)
114+
: InternalTraceLevel.Off;
111115

112116
try
113117
{

src/NUnitEngine/nunit-agent/Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public static void Main(string[] args)
6262
}
6363
}
6464

65-
var logName = $"nunit-agent_{pid}.log";
66-
InternalTrace.Initialize(Path.Combine(workDirectory, logName), traceLevel);
65+
// var logName = $"nunit-agent_{pid}.log";
66+
// InternalTrace.Initialize(Path.Combine(workDirectory, logName), traceLevel); // See PR 1214 https://github.com/nunit/nunit-console/pull/1214/files
6767
log = InternalTrace.GetLogger(typeof(NUnitTestAgent));
6868

6969
log.Info("Agent process {0} starting", pid);

0 commit comments

Comments
 (0)