mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-21 15:27:43 +01:00
feat: print all logged exceptions via Troubleshooting
This commit is contained in:
parent
25a71574cf
commit
59ba3bdd07
3 changed files with 16 additions and 5 deletions
|
|
@ -19,6 +19,7 @@ using Dalamud.Game.Text.SeStringHandling;
|
|||
using Dalamud.Hooking.Internal;
|
||||
using Dalamud.Interface.Internal;
|
||||
using Dalamud.IoC.Internal;
|
||||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Plugin.Internal;
|
||||
using Dalamud.Plugin.Ipc.Internal;
|
||||
using HarmonyLib;
|
||||
|
|
@ -101,6 +102,8 @@ namespace Dalamud
|
|||
{
|
||||
try
|
||||
{
|
||||
SerilogEventSink.Instance.LogLine += SerilogOnLogLine;
|
||||
|
||||
Service<ServiceContainer>.Set();
|
||||
|
||||
// Initialize the process information.
|
||||
|
|
@ -393,6 +396,14 @@ namespace Dalamud
|
|||
// Log.Verbose($"Process.Handle // {__instance.ProcessName} // {__result:X}");
|
||||
}
|
||||
|
||||
private static void SerilogOnLogLine(object? sender, (string Line, LogEventLevel Level, DateTimeOffset TimeStamp, Exception? Exception) e)
|
||||
{
|
||||
if (e.Exception == null)
|
||||
return;
|
||||
|
||||
Troubleshooting.LogException(e.Exception, e.Line);
|
||||
}
|
||||
|
||||
private void ApplyProcessPatch()
|
||||
{
|
||||
var harmony = new Harmony("goatcorp.dalamud");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue