aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core/Logging.cs
diff options
context:
space:
mode:
authoremmauss <emmausssss@gmail.com>2018-04-17 03:24:42 +0300
committergdkchan <gab.dark.100@gmail.com>2018-04-16 21:24:42 -0300
commitb334aab4354e317fb2ef3a2e2f34739249a2d116 (patch)
treeafd1af412b25c7419cb293d3373994b3f3b25a69 /Ryujinx.Core/Logging.cs
parent494e6dfa1ef0a46263d9ea8bb3c9e5bd3b23f43c (diff)
Add special log for stubs (#81)
* add stub loglevel * add log for stubbed methods
Diffstat (limited to 'Ryujinx.Core/Logging.cs')
-rw-r--r--Ryujinx.Core/Logging.cs32
1 files changed, 26 insertions, 6 deletions
diff --git a/Ryujinx.Core/Logging.cs b/Ryujinx.Core/Logging.cs
index 1767e1a0..f650960e 100644
--- a/Ryujinx.Core/Logging.cs
+++ b/Ryujinx.Core/Logging.cs
@@ -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)