1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00

Bug 1948: Debug information is printed at the end of the scripting session when debug logging level is set even if logging is turned off

https://winscp.net/tracker/1948

Source commit: c46326e83e52349ccc6f037c18a59a85d855e099
This commit is contained in:
Martin Prikryl
2021-02-02 08:50:32 +00:00
parent 7e245bfef3
commit 069aa20fb3
3 changed files with 5 additions and 5 deletions

View File

@@ -503,7 +503,7 @@ void __fastcall TScript::Command(UnicodeString Cmd)
UnicodeString LogCmd = GetLogCmd(FullCmd, Command, Cmd);
Log(llInput, LogCmd);
if (Configuration->LogProtocol >= 1)
if (Configuration->ActualLogProtocol >= 1)
{
UnicodeString DummyLogCmd;
if (DebugAlwaysTrue(CutToken(LogCmd, DummyLogCmd)))

View File

@@ -1177,7 +1177,7 @@ void __fastcall TSessionLog::DoAddStartupInfo(TSessionData * Data)
ADF(L"Process ID: %d", (int(GetCurrentProcessId())));
ADF(L"Parent process: %s", (GetAncestorProcessName()));
ADF(L"Command-line: %s", (GetCmdLineLog()));
if (FConfiguration->LogProtocol >= 1)
if (FConfiguration->ActualLogProtocol >= 1)
{
AddOptions(GetGlobalOptions());
}

View File

@@ -657,12 +657,12 @@ void __fastcall TExternalConsole::SendEvent(int Timeout)
{
SetEvent(FRequestEvent);
unsigned int Start = 0; // shut up
if (Configuration->LogProtocol >= 1)
if (Configuration->ActualLogProtocol >= 1)
{
Start = GetTickCount();
}
unsigned int Result = WaitForSingleObject(FResponseEvent, Timeout);
if (Configuration->LogProtocol >= 1)
if (Configuration->ActualLogProtocol >= 1)
{
unsigned int End = GetTickCount();
unsigned int Duration = End - Start;
@@ -2202,7 +2202,7 @@ int __fastcall TConsoleRunner::Run(const UnicodeString Session, TOptions * Optio
{
UnicodeString ExitCodeMessage = FORMAT(L"Exit code: %d", (ExitCode));
FScript->Log(llMessage, ExitCodeMessage);
if (Configuration->LogProtocol >= 1)
if (Configuration->ActualLogProtocol >= 1)
{
FConsole->Print(ExitCodeMessage + L"\n");
UnicodeString LogMessage = FConsole->FinalLogMessage();