Browse Source

With logging level 1 and higher, printing exit debug information on output too.

(cherry picked from commit 99cb32f0b41f47c3ba525a9552959705ae045eb3)

Source commit: 3c1e0a639bd77f8bfc87025e257ef5999e9664ef
Martin Prikryl 7 years ago
parent
commit
bbefb34bc9
1 changed files with 4 additions and 1 deletions
  1. 4 1
      source/windows/ConsoleRunner.cpp

+ 4 - 1
source/windows/ConsoleRunner.cpp

@@ -2098,13 +2098,16 @@ int __fastcall TConsoleRunner::Run(const UnicodeString Session, TOptions * Optio
 
 
     if (FScript != NULL)
     if (FScript != NULL)
     {
     {
-      FScript->Log(llMessage, FORMAT(L"Exit code: %d", (ExitCode)));
+      UnicodeString ExitCodeMessage = FORMAT(L"Exit code: %d", (ExitCode));
+      FScript->Log(llMessage, ExitCodeMessage);
       if (Configuration->LogProtocol >= 1)
       if (Configuration->LogProtocol >= 1)
       {
       {
+        FConsole->Print(ExitCodeMessage + L"\n");
         UnicodeString LogMessage = FConsole->FinalLogMessage();
         UnicodeString LogMessage = FConsole->FinalLogMessage();
         if (!LogMessage.IsEmpty())
         if (!LogMessage.IsEmpty())
         {
         {
           FScript->Log(llMessage, LogMessage);
           FScript->Log(llMessage, LogMessage);
+          FConsole->Print(LogMessage + L"\n");
         }
         }
       }
       }
     }
     }