MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / GetPath

Method GetPath

ProgramLog/log.cpp:34–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34std::filesystem::path Log::GetPath(const std::optional<std::filesystem::path> &storageFolder)
35{
36 std::filesystem::path path;
37 if (storageFolder)
38 {
39 path = *storageFolder / L"TempState";
40 }
41 else
42 {
43 std::error_code code;
44 path = std::filesystem::temp_directory_path(code);
45 if (!code)
46 {
47 path /= APP_NAME;
48 }
49 else
50 {
51 StdErrorCodeHandle(code, spdlog::level::err, L"Failed to get log file path. Logs won't be available during this session");
52
53 return { };
54 }
55 }
56
57 path /= std::format(L"{}.log", GetProcessCreationTime());
58 return path;
59}
60
61void Log::LogErrorHandler(const std::string &message)
62{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected