Skip to content

Commit

Permalink
bug fix SaveLogAs if Log.Level = 0 (None)
Browse files Browse the repository at this point in the history
  • Loading branch information
koechlm committed Dec 7, 2020
1 parent 20b2fe9 commit bd4594a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Autodesk.VltInvSrv.iLogicSampleJob/iLogicJobExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,10 @@ public JobOutcome Execute(IJobProcessorServices context, IJob job)
context.Log(null, "Job failed due to failure in external rule: " + mExtRule + ".");
mDoc.Close(true);
mConnection.FileManager.UndoCheckoutFile(mNewFileIteration);
mLogCtrl.SaveLogAs(mILogicLogFileFullName);
if (mLogCtrl.Level != 0)
{
mLogCtrl.SaveLogAs(mILogicLogFileFullName);
}
return JobOutcome.Failure;
}
else
Expand Down Expand Up @@ -541,7 +544,10 @@ public JobOutcome Execute(IJobProcessorServices context, IJob job)
context.Log(null, "Job failed due to failure in internal rule: " + rule.Name + ".");
mDoc.Close(true);
mConnection.FileManager.UndoCheckoutFile(mNewFileIteration);
mLogCtrl.SaveLogAs(mILogicLogFileFullName);
if (mLogCtrl.Level != 0)
{
mLogCtrl.SaveLogAs(mILogicLogFileFullName);
}
return JobOutcome.Failure;
}
else
Expand All @@ -554,7 +560,10 @@ public JobOutcome Execute(IJobProcessorServices context, IJob job)
}

mDoc.Close(true);
mLogCtrl.SaveLogAs(mILogicLogFileFullName);
if (mLogCtrl.Level != 0)
{
mLogCtrl.SaveLogAs(mILogicLogFileFullName);
}

if (mAllRules.Count > 0)
{
Expand Down

0 comments on commit bd4594a

Please sign in to comment.