added logging to action-runner project (#9034)

This commit is contained in:
Mykhailo Pylyp
2021-01-11 12:51:13 +02:00
committed by GitHub
parent dbda4d50bd
commit 3503ac27a8
3 changed files with 14 additions and 0 deletions

View File

@@ -16,6 +16,10 @@
#include <common/utils/process_path.h>
#include <common/utils/resources.h>
#include <common/SettingsAPI/settings_helpers.h>
#include <common/logger/logger.h>
#include <winrt/Windows.ApplicationModel.h>
#include <winrt/Windows.Storage.h>
#include <Msi.h>
@@ -173,6 +177,10 @@ int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
}
std::wstring_view action{ args[1] };
std::filesystem::path logFilePath(PTSettingsHelper::get_root_save_folder_location());
logFilePath.append(LogSettings::actionRunnerLogPath);
Logger::init(LogSettings::actionRunnerLoggerName, logFilePath.wstring(), PTSettingsHelper::get_log_settings_file_location());
if (action == RUN_NONELEVATED_CMDARG)
{
int nextArg = 2;