mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 13:57:43 +01:00
Write troubleshooting to json file
This commit is contained in:
parent
951290cac7
commit
ac7c4e889a
2 changed files with 10 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
|
@ -85,6 +86,13 @@ public static class Troubleshooting
|
||||||
|
|
||||||
var encodedPayload = Convert.ToBase64String(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(payload)));
|
var encodedPayload = Convert.ToBase64String(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(payload)));
|
||||||
Log.Information($"TROUBLESHOOTING:{encodedPayload}");
|
Log.Information($"TROUBLESHOOTING:{encodedPayload}");
|
||||||
|
|
||||||
|
File.WriteAllText(
|
||||||
|
Path.Join(
|
||||||
|
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||||
|
"XIVLauncher",
|
||||||
|
"dalamud.troubleshooting.json"),
|
||||||
|
JsonConvert.SerializeObject(payload, Formatting.Indented));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -476,6 +476,7 @@ void export_tspack(HWND hWndParent, const std::filesystem::path& logDir, const s
|
||||||
"launcher.log", // XIVLauncher.Core for [mostly] Linux
|
"launcher.log", // XIVLauncher.Core for [mostly] Linux
|
||||||
"patcher.log",
|
"patcher.log",
|
||||||
"dalamud.log",
|
"dalamud.log",
|
||||||
|
"dalamud.troubleshooting.json",
|
||||||
"dalamud.injector.log",
|
"dalamud.injector.log",
|
||||||
"dalamud.boot.log",
|
"dalamud.boot.log",
|
||||||
"aria.log",
|
"aria.log",
|
||||||
|
|
@ -693,7 +694,7 @@ void restart_game_using_injector(int nRadioButton, const std::vector<std::wstrin
|
||||||
void get_cpu_info(wchar_t *vendor, wchar_t *brand)
|
void get_cpu_info(wchar_t *vendor, wchar_t *brand)
|
||||||
{
|
{
|
||||||
// Gotten and reformatted to not include all data as listed at https://learn.microsoft.com/en-us/cpp/intrinsics/cpuid-cpuidex?view=msvc-170#example
|
// Gotten and reformatted to not include all data as listed at https://learn.microsoft.com/en-us/cpp/intrinsics/cpuid-cpuidex?view=msvc-170#example
|
||||||
|
|
||||||
// int cpuInfo[4] = {-1};
|
// int cpuInfo[4] = {-1};
|
||||||
std::array<int, 4> cpui;
|
std::array<int, 4> cpui;
|
||||||
int nIds_;
|
int nIds_;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue