From 95cc18a7b41ca28f47b1388d1952e341fe568430 Mon Sep 17 00:00:00 2001 From: mlgatto <98356234+mlgatto@users.noreply.github.com> Date: Fri, 18 Feb 2022 01:08:07 +0100 Subject: Added trace log level (#3096) * added trace log level * use trace log level instead of debug ( #1547) * alignment #1547 * moved trace logs toggle at the bottom #1547 * bumped config file version #3096 * added migration step #3096 * setting moved to the dev section #1547 * performance warning displayed when trace is enabled #1547 --- Ryujinx.Common/Logging/Logger.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Common/Logging/Logger.cs') 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 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 levels = new List(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"); } } -- cgit v1.2.3