mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: franzbot troubleshooting things
This commit is contained in:
parent
87919a097d
commit
9048588d99
2 changed files with 43 additions and 0 deletions
|
|
@ -170,6 +170,8 @@ namespace Dalamud {
|
|||
this.ClientState.Enable();
|
||||
|
||||
IsReady = true;
|
||||
|
||||
Troubleshooting.LogTroubleshooting(this);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
41
Dalamud/Troubleshooting.cs
Normal file
41
Dalamud/Troubleshooting.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Dalamud.Plugin;
|
||||
using Newtonsoft.Json;
|
||||
using Serilog;
|
||||
using Encoding = System.Text.Encoding;
|
||||
|
||||
namespace Dalamud
|
||||
{
|
||||
internal static class Troubleshooting
|
||||
{
|
||||
private class TroubleshootingPayload {
|
||||
public PluginDefinition[] LoadedPlugins { get; set; }
|
||||
public string DalamudVersion { get; set; }
|
||||
public string GameVersion { get; set; }
|
||||
public string Language { get; set; }
|
||||
public bool DoDalamudTest { get; set; }
|
||||
public bool DoPluginTest { get; set; }
|
||||
}
|
||||
|
||||
public static void LogTroubleshooting(Dalamud dalamud) {
|
||||
try {
|
||||
var payload = new TroubleshootingPayload {
|
||||
LoadedPlugins = dalamud.PluginManager.Plugins.Select(x => x.Definition).ToArray(),
|
||||
DalamudVersion = Util.AssemblyVersion,
|
||||
GameVersion = dalamud.StartInfo.GameVersion,
|
||||
Language = dalamud.StartInfo.Language.ToString(),
|
||||
DoDalamudTest = dalamud.Configuration.DoDalamudTest,
|
||||
DoPluginTest = dalamud.Configuration.DoPluginTest
|
||||
};
|
||||
|
||||
|
||||
Log.Information("TROUBLESHOOTING:" +
|
||||
System.Convert.ToBase64String(
|
||||
Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(payload))));
|
||||
} catch (Exception ex) {
|
||||
Log.Error(ex, "Could not print troubleshooting.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue