From 1ab57da3fd6256685f8ec94685ea9e883f04db49 Mon Sep 17 00:00:00 2001 From: Peter Repukat Date: Sun, 25 Sep 2022 14:50:29 +0200 Subject: [PATCH] GlosSITarget: log pids of launched processes --- GlosSITarget/AppLauncher.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GlosSITarget/AppLauncher.cpp b/GlosSITarget/AppLauncher.cpp index 3c12d6e..e6f49d4 100644 --- a/GlosSITarget/AppLauncher.cpp +++ b/GlosSITarget/AppLauncher.cpp @@ -225,7 +225,7 @@ void AppLauncher::launchWin32App(const std::wstring& path, const std::wstring& a &info, &process_info)) { //spdlog::info(L"Started Program: \"{}\" in directory: \"{}\"", native_seps_path, launch_dir); - spdlog::info(L"Started Program: \"{}\"", native_seps_path); + spdlog::info(L"Started Program: \"{}\"; PID: {}", native_seps_path, process_info.dwProcessId); pids_.push_back(process_info.dwProcessId); } else { @@ -268,7 +268,7 @@ void AppLauncher::launchUWPApp(const LPCWSTR package_full_name, const std::wstri pids_.clear(); } else { - spdlog::info(L"Launched UWP Package \"{}\"", package_full_name); + spdlog::info(L"Launched UWP Package \"{}\"; PID: {}", package_full_name, pids_[0]); } } else { @@ -311,6 +311,7 @@ void AppLauncher::launchURL(const std::wstring& url, const std::wstring& args, c if (execute_info.hProcess != nullptr) { if (const auto pid = GetProcessId(execute_info.hProcess); pid > 0) { pids_.push_back(pid); + spdlog::trace("Launched URL; PID: {}", pid); return; } }