mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:17:22 +01:00
add inner exception stacktraces
This commit is contained in:
parent
0f0d1e9a9d
commit
4ee0a670c0
1 changed files with 7 additions and 0 deletions
|
|
@ -36,6 +36,13 @@ internal sealed class DalamudLogger : ILogger
|
|||
StringBuilder sb = new();
|
||||
sb.AppendLine($"[{_name}]{{{(int)logLevel}}} {state}: {exception?.Message}");
|
||||
sb.AppendLine(exception?.StackTrace);
|
||||
var innerException = exception?.InnerException;
|
||||
while (innerException != null)
|
||||
{
|
||||
sb.AppendLine($"InnerException {innerException}: {innerException.Message}");
|
||||
sb.AppendLine(innerException.StackTrace);
|
||||
innerException = innerException.InnerException;
|
||||
}
|
||||
if (logLevel == LogLevel.Warning)
|
||||
_pluginLog.Warning(sb.ToString());
|
||||
else if (logLevel == LogLevel.Error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue