aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/Logging
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Common/Logging')
-rw-r--r--Ryujinx.Common/Logging/LogLevel.cs3
-rw-r--r--Ryujinx.Common/Logging/Logger.cs5
-rw-r--r--Ryujinx.Common/Logging/Targets/ConsoleLogTarget.cs1
3 files changed, 7 insertions, 2 deletions
diff --git a/Ryujinx.Common/Logging/LogLevel.cs b/Ryujinx.Common/Logging/LogLevel.cs
index b1c2d23b..8857fb45 100644
--- a/Ryujinx.Common/Logging/LogLevel.cs
+++ b/Ryujinx.Common/Logging/LogLevel.cs
@@ -9,6 +9,7 @@ namespace Ryujinx.Common.Logging
Error,
Guest,
AccessLog,
- Notice
+ Notice,
+ Trace
}
}
diff --git a/Ryujinx.Common/Logging/Logger.cs b/Ryujinx.Common/Logging/Logger.cs
index 040a555b..475e3628 100644
--- a/Ryujinx.Common/Logging/Logger.cs
+++ b/Ryujinx.Common/Logging/Logger.cs
@@ -90,6 +90,7 @@ namespace Ryujinx.Common.Logging
public static Log? Guest { get; private set; }
public static Log? AccessLog { get; private set; }
public static Log? Stub { get; private set; }
+ public static Log? Trace { get; private set; }
public static Log Notice { get; } // Always enabled
static Logger()
@@ -117,6 +118,7 @@ namespace Ryujinx.Common.Logging
Error = new Log(LogLevel.Error);
Warning = new Log(LogLevel.Warning);
Info = new Log(LogLevel.Info);
+ Trace = new Log(LogLevel.Trace);
}
public static void RestartTime()
@@ -172,7 +174,7 @@ namespace Ryujinx.Common.Logging
public static IReadOnlyCollection<LogLevel> GetEnabledLevels()
{
- var logs = new Log?[] { Debug, Info, Warning, Error, Guest, AccessLog, Stub };
+ var logs = new Log?[] { Debug, Info, Warning, Error, Guest, AccessLog, Stub, Trace };
List<LogLevel> levels = new List<LogLevel>(logs.Length);
foreach (var log in logs)
{
@@ -196,6 +198,7 @@ namespace Ryujinx.Common.Logging
case LogLevel.Guest : Guest = enabled ? new Log(LogLevel.Guest) : new Log?(); break;
case LogLevel.AccessLog : AccessLog = enabled ? new Log(LogLevel.AccessLog): new Log?(); break;
case LogLevel.Stub : Stub = enabled ? new Log(LogLevel.Stub) : new Log?(); break;
+ case LogLevel.Trace : Trace = enabled ? new Log(LogLevel.Trace) : new Log?(); break;
default: throw new ArgumentException("Unknown Log Level");
}
}
diff --git a/Ryujinx.Common/Logging/Targets/ConsoleLogTarget.cs b/Ryujinx.Common/Logging/Targets/ConsoleLogTarget.cs
index 15f0e153..54e9e85c 100644
--- a/Ryujinx.Common/Logging/Targets/ConsoleLogTarget.cs
+++ b/Ryujinx.Common/Logging/Targets/ConsoleLogTarget.cs
@@ -17,6 +17,7 @@ namespace Ryujinx.Common.Logging
LogLevel.Error => ConsoleColor.Red,
LogLevel.Stub => ConsoleColor.DarkGray,
LogLevel.Notice => ConsoleColor.Cyan,
+ LogLevel.Trace => ConsoleColor.DarkCyan,
_ => ConsoleColor.Gray,
};