diff options
| author | mageven <62494521+mageven@users.noreply.github.com> | 2020-08-04 05:02:53 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-04 01:32:53 +0200 |
| commit | a33dc2f4919f7fdc8ea9db41c4c70c38cedfd3df (patch) | |
| tree | d3eee67f25c3a302fa23dc39670438e7ebbfd35c /Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy | |
| parent | 60db4c353099e8656a330ede03fdbe57a421fa47 (diff) | |
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
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy')
6 files changed, 26 insertions, 26 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IAudioController.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IAudioController.cs index e630c80d..426914bb 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IAudioController.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IAudioController.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys float appletVolume = context.RequestData.ReadSingle(); float libraryAppletVolume = context.RequestData.ReadSingle(); - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } @@ -24,7 +24,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { context.ResponseData.Write(1f); - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } @@ -35,7 +35,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { context.ResponseData.Write(1f); - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } @@ -47,7 +47,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys float unknown0 = context.RequestData.ReadSingle(); long unknown1 = context.RequestData.ReadInt64(); - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } @@ -58,7 +58,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { float unknown0 = context.RequestData.ReadSingle(); - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ICommonStateGetter.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ICommonStateGetter.cs index 30192455..a2113163 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ICommonStateGetter.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ICommonStateGetter.cs @@ -76,7 +76,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { context.ResponseData.Write((byte)0); //Unknown value. - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } @@ -120,7 +120,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle); - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IHomeMenuFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IHomeMenuFunctions.cs index c461c1c4..5fafa154 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IHomeMenuFunctions.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IHomeMenuFunctions.cs @@ -20,7 +20,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys // RequestToGetForeground() public ResultCode RequestToGetForeground(ServiceCtx context) { - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } @@ -36,7 +36,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle); - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ILibraryAppletCreator.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ILibraryAppletCreator.cs index bc0e4d8a..decf5470 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ILibraryAppletCreator.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ILibraryAppletCreator.cs @@ -43,7 +43,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys if (transferMem == null) { - Logger.PrintWarning(LogClass.ServiceAm, $"Invalid TransferMemory Handle: {handle:X}"); + Logger.Warning?.Print(LogClass.ServiceAm, $"Invalid TransferMemory Handle: {handle:X}"); return ResultCode.Success; // TODO: Find correct error code } diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs index f1dab0e5..8b1275ac 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs @@ -41,7 +41,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys // Exit() public ResultCode Exit(ServiceCtx context) { - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } @@ -50,7 +50,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys // LockExit() public ResultCode LockExit(ServiceCtx context) { - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } @@ -59,7 +59,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys // UnlockExit() public ResultCode UnlockExit(ServiceCtx context) { - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } @@ -110,7 +110,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle); - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } @@ -121,7 +121,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { bool screenShotPermission = context.RequestData.ReadBoolean(); - Logger.PrintStub(LogClass.ServiceAm, new { screenShotPermission }); + Logger.Stub?.PrintStub(LogClass.ServiceAm, new { screenShotPermission }); _screenShotPermission = screenShotPermission; @@ -134,7 +134,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { bool operationModeChangedNotification = context.RequestData.ReadBoolean(); - Logger.PrintStub(LogClass.ServiceAm, new { operationModeChangedNotification }); + Logger.Stub?.PrintStub(LogClass.ServiceAm, new { operationModeChangedNotification }); _operationModeChangedNotification = operationModeChangedNotification; @@ -147,7 +147,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { bool performanceModeChangedNotification = context.RequestData.ReadBoolean(); - Logger.PrintStub(LogClass.ServiceAm, new { performanceModeChangedNotification }); + Logger.Stub?.PrintStub(LogClass.ServiceAm, new { performanceModeChangedNotification }); _performanceModeChangedNotification = performanceModeChangedNotification; @@ -162,7 +162,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys bool unknownFlag2 = context.RequestData.ReadBoolean(); bool unknownFlag3 = context.RequestData.ReadBoolean(); - Logger.PrintStub(LogClass.ServiceAm, new { unknownFlag1, unknownFlag2, unknownFlag3 }); + Logger.Stub?.PrintStub(LogClass.ServiceAm, new { unknownFlag1, unknownFlag2, unknownFlag3 }); return ResultCode.Success; } @@ -173,7 +173,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { bool restartMessageEnabled = context.RequestData.ReadBoolean(); - Logger.PrintStub(LogClass.ServiceAm, new { restartMessageEnabled }); + Logger.Stub?.PrintStub(LogClass.ServiceAm, new { restartMessageEnabled }); _restartMessageEnabled = restartMessageEnabled; @@ -186,7 +186,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { bool outOfFocusSuspendingEnabled = context.RequestData.ReadBoolean(); - Logger.PrintStub(LogClass.ServiceAm, new { outOfFocusSuspendingEnabled }); + Logger.Stub?.PrintStub(LogClass.ServiceAm, new { outOfFocusSuspendingEnabled }); _outOfFocusSuspendingEnabled = outOfFocusSuspendingEnabled; @@ -199,7 +199,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { uint screenShotImageOrientation = context.RequestData.ReadUInt32(); - Logger.PrintStub(LogClass.ServiceAm, new { screenShotImageOrientation }); + Logger.Stub?.PrintStub(LogClass.ServiceAm, new { screenShotImageOrientation }); _screenShotImageOrientation = screenShotImageOrientation; @@ -212,7 +212,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { bool handlesRequestToDisplay = context.RequestData.ReadBoolean(); - Logger.PrintStub(LogClass.ServiceAm, new { handlesRequestToDisplay }); + Logger.Stub?.PrintStub(LogClass.ServiceAm, new { handlesRequestToDisplay }); _handlesRequestToDisplay = handlesRequestToDisplay; @@ -225,7 +225,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { uint idleTimeDetectionExtension = context.RequestData.ReadUInt32(); - Logger.PrintStub(LogClass.ServiceAm, new { idleTimeDetectionExtension }); + Logger.Stub?.PrintStub(LogClass.ServiceAm, new { idleTimeDetectionExtension }); _idleTimeDetectionExtension = idleTimeDetectionExtension; @@ -238,7 +238,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys { context.ResponseData.Write(_idleTimeDetectionExtension); - Logger.PrintStub(LogClass.ServiceAm, new { _idleTimeDetectionExtension }); + Logger.Stub?.PrintStub(LogClass.ServiceAm, new { _idleTimeDetectionExtension }); return ResultCode.Success; } diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IWindowController.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IWindowController.cs index 449658cf..5c5c9b88 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IWindowController.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IWindowController.cs @@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys // GetAppletResourceUserId() -> nn::applet::AppletResourceUserId public ResultCode GetAppletResourceUserId(ServiceCtx context) { - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); context.ResponseData.Write(0L); @@ -21,7 +21,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys // AcquireForegroundRights() public ResultCode AcquireForegroundRights(ServiceCtx context) { - Logger.PrintStub(LogClass.ServiceAm); + Logger.Stub?.PrintStub(LogClass.ServiceAm); return ResultCode.Success; } |
