mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-20 05:47:11 +02:00
[Logger] Add print with stacktrace method (#5129)
* Add print with stacktrace method * Adjust logging namespaces * Add static keyword to DynamicObjectFormatter
This commit is contained in:
parent
12c62fdbc2
commit
f4539c49d8
12 changed files with 44 additions and 19 deletions
|
@ -1,6 +1,7 @@
|
|||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace Ryujinx.Common.Logging
|
||||
namespace Ryujinx.Common.Logging.Formatters
|
||||
{
|
||||
internal class DefaultLogFormatter : ILogFormatter
|
||||
{
|
||||
|
@ -27,6 +28,14 @@ namespace Ryujinx.Common.Logging
|
|||
|
||||
if (args.Data is not null)
|
||||
{
|
||||
if (args.Data is StackTrace trace)
|
||||
{
|
||||
sb.Append('\n');
|
||||
sb.Append(trace);
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
sb.Append(' ');
|
||||
DynamicObjectFormatter.Format(sb, args.Data);
|
||||
}
|
||||
|
@ -39,4 +48,4 @@ namespace Ryujinx.Common.Logging
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue