Skip to content

Commit

Permalink
Fix for issue #1178 based on fix in PR #1214 for version 3.17++
Browse files Browse the repository at this point in the history
  • Loading branch information
OsirisTerje committed Apr 2, 2024
1 parent 685c5b5 commit 7ba3d66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/NUnitConsole/nunit3-console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ public static int Main(string[] args)
if (Options.WorkDirectory != null)
engine.WorkDirectory = Options.WorkDirectory;

if (Options.InternalTraceLevel != null)
engine.InternalTraceLevel = (InternalTraceLevel)Enum.Parse(typeof(InternalTraceLevel), Options.InternalTraceLevel);
//if (Options.InternalTraceLevel != null)
// engine.InternalTraceLevel = (InternalTraceLevel)Enum.Parse(typeof(InternalTraceLevel), Options.InternalTraceLevel);
// See PR 1114 https://github.com/nunit/nunit-console/pull/1214/files
engine.InternalTraceLevel = Options.InternalTraceLevel != null
? (InternalTraceLevel)Enum.Parse(typeof(InternalTraceLevel), Options.InternalTraceLevel)
: InternalTraceLevel.Off;

try
{
Expand Down
4 changes: 2 additions & 2 deletions src/NUnitEngine/nunit-agent/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public static void Main(string[] args)
}
}

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

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

0 comments on commit 7ba3d66

Please sign in to comment.