Improved Logger (#1292)
* Logger class changes only Now compile-time checking is possible with the help of Nullable Value types. * Misc formatting * Manual optimizations PrintGuestLog PrintGuestStackTrace Surfaceflinger DequeueBuffer * Reduce SendVibrationXX log level to Debug * Add Notice log level This level is always enabled and used to print system info, etc... Also, rewrite LogColor to switch expression as colors are static * Unify unhandled exception event handlers * Print enabled LogLevels during init * Re-add App Exit disposes in proper order nit: switch case spacing * Revert PrintGuestStackTrace to Info logs due to #1407 PrintGuestStackTrace is now called in some critical error handlers so revert to old behavior as KThread isn't part of Guest. * Batch replace Logger statements
This commit is contained in:
parent
60db4c3530
commit
a33dc2f491
120 changed files with 800 additions and 809 deletions
|
@ -28,14 +28,14 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||
byte runtimeAddOnContentInstall = context.Device.Application.ControlData.Value.RuntimeAddOnContentInstall;
|
||||
if (runtimeAddOnContentInstall != 0)
|
||||
{
|
||||
Logger.PrintWarning(LogClass.ServiceNs, $"RuntimeAddOnContentInstall is true. Some DLC may be missing");
|
||||
Logger.Warning?.Print(LogClass.ServiceNs, $"RuntimeAddOnContentInstall is true. Some DLC may be missing");
|
||||
}
|
||||
|
||||
uint aocCount = CountAddOnContentImpl(context);
|
||||
|
||||
context.ResponseData.Write(aocCount);
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceNs, new { aocCount, runtimeAddOnContentInstall });
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceNs, new { aocCount, runtimeAddOnContentInstall });
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||
context.Memory.Write(bufAddr + (ulong)i * 4, (int)(aocTitleIds[i + (int)startIndex] - aocBaseId));
|
||||
}
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceNs, new { bufferSize, startIndex, aocCount });
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceNs, new { bufferSize, startIndex, aocCount });
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||
|
||||
context.ResponseData.Write(aocBaseId);
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceNs, $"aocBaseId={aocBaseId:X16}");
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceNs, $"aocBaseId={aocBaseId:X16}");
|
||||
|
||||
// ResultCode will be error code of GetApplicationLaunchProperty if it fails
|
||||
return ResultCode.Success;
|
||||
|
@ -124,7 +124,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||
|
||||
// Ideally, this should probably initialize the AocData values for the specified index
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceNs, new { aocIndex });
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceNs, new { aocIndex });
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||
|
||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceNs);
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceNs);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||
// which gives 0x874 (2000+164). 164 being Module ID of `EC (Shop)`
|
||||
context.ResponseData.Write(2164L);
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceNs);
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceNs);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||
{
|
||||
MakeObject(context, new IPurchaseEventManager(context.Device.System));
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceNs);
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceNs);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||
|
||||
MakeObject(context, new IPurchaseEventManager(context.Device.System));
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceNs);
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceNs);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue