diff --git a/src/action_runner/action_runner.cpp b/src/action_runner/action_runner.cpp index f1501ec2c9..144d57b3e8 100644 --- a/src/action_runner/action_runner.cpp +++ b/src/action_runner/action_runner.cpp @@ -16,6 +16,10 @@ #include #include +#include + +#include + #include #include #include @@ -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; diff --git a/src/action_runner/action_runner.vcxproj b/src/action_runner/action_runner.vcxproj index 78b6437a56..89133a9928 100644 --- a/src/action_runner/action_runner.vcxproj +++ b/src/action_runner/action_runner.vcxproj @@ -47,6 +47,9 @@ + + {d9b8fc84-322a-4f9f-bbb9-20915c47ddfd} + {1d5be09d-78c0-4fd7-af00-ae7c1af7c525} @@ -69,6 +72,7 @@ + diff --git a/src/common/logger/logger_settings.h b/src/common/logger/logger_settings.h index 7c293f09af..90822de22f 100644 --- a/src/common/logger/logger_settings.h +++ b/src/common/logger/logger_settings.h @@ -8,6 +8,8 @@ struct LogSettings inline const static std::wstring logLevelOption = L"logLevel"; inline const static std::string runnerLoggerName = "runner"; inline const static std::wstring runnerLogPath = L"RunnerLogs\\runner-log.txt"; + inline const static std::string actionRunnerLoggerName = "action-runner"; + inline const static std::wstring actionRunnerLogPath = L"RunnerLogs\\action-runner-log.txt"; inline const static std::string launcherLoggerName = "launcher"; inline const static std::wstring launcherLogPath = L"LogsModuleInterface\\launcher-log.txt"; inline const static std::string fancyZonesLoggerName = "fancyzones";