Add logclass, made changes to logging calls (#79)

* add logclass, made changes to logging calls

* made enum parsing case insensitive

* enable logclass on partial or complete match
This commit is contained in:
emmauss 2018-04-14 04:02:24 +03:00 committed by gdkchan
parent 435f9ffad8
commit bbcad307bd
20 changed files with 180 additions and 98 deletions

View file

@ -91,7 +91,7 @@ namespace Ryujinx.Core.OsHle
throw new ObjectDisposedException(nameof(Process));
}
Logging.Info($"Image base at 0x{ImageBase:x16}.");
Logging.Info(LogClass.Loader, $"Image base at 0x{ImageBase:x16}.");
Executable Executable = new Executable(Program, Memory, ImageBase);
@ -260,7 +260,7 @@ namespace Ryujinx.Core.OsHle
}
}
Logging.Trace($"Executing at 0x{e.Position:x16} {e.SubName} {NsoName}");
Logging.Trace(LogClass.Loader, $"Executing at 0x{e.Position:x16} {e.SubName} {NsoName}");
}
public void EnableCpuTracing()
@ -290,7 +290,7 @@ namespace Ryujinx.Core.OsHle
{
if (sender is AThread Thread)
{
Logging.Info($"Thread {Thread.ThreadId} exiting...");
Logging.Info(LogClass.KernelScheduler, $"Thread {Thread.ThreadId} exiting...");
TlsSlots.TryRemove(GetTlsSlot(Thread.ThreadState.Tpidr), out _);
}
@ -302,7 +302,7 @@ namespace Ryujinx.Core.OsHle
Dispose();
}
Logging.Info($"No threads running, now exiting Process {ProcessId}...");
Logging.Info(LogClass.KernelScheduler, $"No threads running, now exiting Process {ProcessId}...");
Ns.Os.ExitProcess(ProcessId);
}
@ -317,7 +317,7 @@ namespace Ryujinx.Core.OsHle
{
if (!ThreadsByTpidr.TryGetValue(Tpidr, out KThread Thread))
{
Logging.Error($"Thread with TPIDR 0x{Tpidr:x16} not found!");
Logging.Error(LogClass.KernelScheduler, $"Thread with TPIDR 0x{Tpidr:x16} not found!");
}
return Thread;
@ -340,7 +340,7 @@ namespace Ryujinx.Core.OsHle
{
ShouldDispose = true;
Logging.Info($"Process {ProcessId} waiting all threads terminate...");
Logging.Info(LogClass.KernelScheduler, $"Process {ProcessId} waiting all threads terminate...");
return;
}
@ -369,7 +369,7 @@ namespace Ryujinx.Core.OsHle
Memory.Dispose();
Logging.Info($"Process {ProcessId} exiting...");
Logging.Info(LogClass.KernelScheduler, $"Process {ProcessId} exiting...");
}
}
}