Add special log for stubs (#81)
* add stub loglevel * add log for stubbed methods
This commit is contained in:
parent
494e6dfa1e
commit
b334aab435
19 changed files with 122 additions and 14 deletions
|
@ -20,6 +20,7 @@ namespace Ryujinx.Core
|
|||
private static bool EnableWarn = Config.LoggingEnableWarn;
|
||||
private static bool EnableError = Config.LoggingEnableError;
|
||||
private static bool EnableFatal = Config.LoggingEnableFatal;
|
||||
private static bool EnableStub = Config.LoggingEnableIpc;
|
||||
private static bool EnableIpc = Config.LoggingEnableIpc;
|
||||
private static bool EnableFilter = Config.LoggingEnableFilter;
|
||||
private static bool EnableLogFile = Config.LoggingEnableLogFile;
|
||||
|
@ -27,12 +28,13 @@ namespace Ryujinx.Core
|
|||
|
||||
private enum LogLevel
|
||||
{
|
||||
Debug = 1,
|
||||
Error = 2,
|
||||
Fatal = 3,
|
||||
Info = 4,
|
||||
Trace = 5,
|
||||
Warn = 6
|
||||
Debug,
|
||||
Error,
|
||||
Fatal,
|
||||
Info,
|
||||
Stub,
|
||||
Trace,
|
||||
Warn
|
||||
}
|
||||
|
||||
static Logging()
|
||||
|
@ -68,6 +70,9 @@ namespace Ryujinx.Core
|
|||
case LogLevel.Info:
|
||||
consoleColor = ConsoleColor.White;
|
||||
break;
|
||||
case LogLevel.Stub:
|
||||
consoleColor = ConsoleColor.DarkYellow;
|
||||
break;
|
||||
case LogLevel.Trace:
|
||||
consoleColor = ConsoleColor.DarkGray;
|
||||
break;
|
||||
|
@ -129,6 +134,21 @@ namespace Ryujinx.Core
|
|||
}
|
||||
}
|
||||
|
||||
public static void Stub(LogClass LogClass, string Message, [CallerMemberName] string CallingMember = "")
|
||||
{
|
||||
if (EnableStub)
|
||||
{
|
||||
LogMessage(new LogEntry
|
||||
{
|
||||
CallingMember = CallingMember,
|
||||
LogLevel = LogLevel.Stub,
|
||||
LogClass = LogClass,
|
||||
Message = Message,
|
||||
ExecutionTime = GetExecutionTime()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static void Debug(LogClass LogClass,string Message, [CallerMemberName] string CallingMember = "")
|
||||
{
|
||||
if (EnableDebug)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue