Implement OutputAccessLogToSdCard and expose an FS access log option (#700)
* Add OutputAccessLogToSdCard * Add config options for the FS access log
This commit is contained in:
parent
5c1bc52409
commit
350a3667f7
9 changed files with 136 additions and 20 deletions
|
@ -22,10 +22,12 @@ namespace Ryujinx.Common.Logging
|
|||
m_EnabledLevels = new bool[Enum.GetNames(typeof(LogLevel)).Length];
|
||||
m_EnabledClasses = new bool[Enum.GetNames(typeof(LogClass)).Length];
|
||||
|
||||
m_EnabledLevels[(int)LogLevel.Stub] = true;
|
||||
m_EnabledLevels[(int)LogLevel.Info] = true;
|
||||
m_EnabledLevels[(int)LogLevel.Warning] = true;
|
||||
m_EnabledLevels[(int)LogLevel.Error] = true;
|
||||
m_EnabledLevels[(int)LogLevel.Stub] = true;
|
||||
m_EnabledLevels[(int)LogLevel.Info] = true;
|
||||
m_EnabledLevels[(int)LogLevel.Warning] = true;
|
||||
m_EnabledLevels[(int)LogLevel.Error] = true;
|
||||
m_EnabledLevels[(int)LogLevel.Guest] = true;
|
||||
m_EnabledLevels[(int)LogLevel.AccessLog] = true;
|
||||
|
||||
for (int index = 0; index < m_EnabledClasses.Length; index++)
|
||||
{
|
||||
|
@ -101,6 +103,16 @@ namespace Ryujinx.Common.Logging
|
|||
Print(LogLevel.Stub, logClass, GetFormattedMessage(logClass, "Stubbed. " + message, caller), obj);
|
||||
}
|
||||
|
||||
public static void PrintGuest(LogClass logClass, string message, [CallerMemberName] string caller = "")
|
||||
{
|
||||
Print(LogLevel.Guest, logClass, GetFormattedMessage(logClass, message, caller));
|
||||
}
|
||||
|
||||
public static void PrintAccessLog(LogClass logClass, string message)
|
||||
{
|
||||
Print(LogLevel.AccessLog, logClass, message);
|
||||
}
|
||||
|
||||
private static void Print(LogLevel logLevel, LogClass logClass, string message)
|
||||
{
|
||||
if (m_EnabledLevels[(int)logLevel] && m_EnabledClasses[(int)logClass])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue