aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/logging.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-01-31 00:19:36 +0000
committerGitHub <noreply@github.com>2022-01-31 00:19:36 +0000
commit186a4e2dbcb8a7c2f1a24f6657f0c5daa00a7fd5 (patch)
treeb5d45cea23a50f0ff453684cb20d5fed5fef8bf1 /NorthstarDedicatedTest/logging.cpp
parenta589bb0082cbae6d326644292179c9427e76e795 (diff)
parent033c8989c28384529fef72e0e8e17e824ceac8d4 (diff)
downloadNorthstarLauncher-186a4e2dbcb8a7c2f1a24f6657f0c5daa00a7fd5.tar.gz
NorthstarLauncher-186a4e2dbcb8a7c2f1a24f6657f0c5daa00a7fd5.zip
Merge pull request #61 from emma-miler/cla
Added command line option for custom northstar directory
Diffstat (limited to 'NorthstarDedicatedTest/logging.cpp')
-rw-r--r--NorthstarDedicatedTest/logging.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/NorthstarDedicatedTest/logging.cpp b/NorthstarDedicatedTest/logging.cpp
index 9fc39cde..136fdf9b 100644
--- a/NorthstarDedicatedTest/logging.cpp
+++ b/NorthstarDedicatedTest/logging.cpp
@@ -9,6 +9,7 @@
#include <sstream>
#include <Psapi.h>
#include <minidumpapiset.h>
+#include "configurables.h"
// This needs to be called after hooks are loaded so we can access the command line args
@@ -25,7 +26,7 @@ void CreateLogFiles()
tm currentTime = *std::localtime(&time);
std::stringstream stream;
- stream << std::put_time(&currentTime, "R2Northstar/logs/nslog%Y-%m-%d %H-%M-%S.txt");
+ stream << std::put_time(&currentTime, (GetNorthstarPrefix() + "/logs/nslog%Y-%m-%d %H-%M-%S.txt").c_str());
spdlog::default_logger()->sinks().push_back(std::make_shared<spdlog::sinks::basic_file_sink_mt>(stream.str(), false));
spdlog::flush_on(spdlog::level::info);
}
@@ -175,7 +176,7 @@ long __stdcall ExceptionFilter(EXCEPTION_POINTERS* exceptionInfo)
time_t time = std::time(nullptr);
tm currentTime = *std::localtime(&time);
std::stringstream stream;
- stream << std::put_time(&currentTime, "R2Northstar/logs/nsdump%Y-%m-%d %H-%M-%S.dmp");
+ stream << std::put_time(&currentTime, (GetNorthstarPrefix() + "/logs/nsdump%Y-%m-%d %H-%M-%S.dmp").c_str());
auto hMinidumpFile = CreateFileA(stream.str().c_str(), GENERIC_WRITE, FILE_SHARE_READ, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
if (hMinidumpFile)