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:
@@ -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)))
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user