Skip to content

Commit 157a7cf

Browse files
committed
Add the command which was executed to the logs
1 parent ab5e6cb commit 157a7cf

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

LaunchBounce/Source/Process.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ std::vector<unsigned char> Process::ReadPipe()
109109

110110
void Process::ReadProcessPipes()
111111
{
112+
Logger::Info(L"----------------------------------------------------------------------------------");
113+
112114
while (IsRunning())
113115
{
114116
const auto result = ReadPipe();
@@ -121,12 +123,12 @@ void Process::ReadProcessPipes()
121123
}
122124

123125
const auto result = ReadPipe();
124-
if (0 == result.size())
126+
if (0 != result.size())
125127
{
126-
return;
128+
PrintData(result);
127129
}
128130

129-
PrintData(result);
131+
Logger::Info(L"----------------------------------------------------------------------------------");
130132
}
131133

132134
bool Process::IsRunning()
@@ -164,6 +166,8 @@ int Process::Launch()
164166
cmdLine += L" " + parameter;
165167
}
166168

169+
Logger::Info(std::format(L"Launch the application: {}", cmdLine));
170+
167171
SECURITY_ATTRIBUTES processAttributes{};
168172
SECURITY_ATTRIBUTES threadAttributes{};
169173

0 commit comments

Comments
 (0)