Move logging to Ryujinx.Common and make it a static class (#413)

This commit is contained in:
ReinUsesLisp 2018-10-17 14:15:50 -03:00 committed by gdkchan
parent 9b19ea3c87
commit b3a4662be1
61 changed files with 612 additions and 585 deletions

View file

@ -1,5 +1,5 @@
using ChocolArm64.Memory;
using Ryujinx.HLE.Logging;
using Ryujinx.Common.Logging;
using System;
using System.Collections.Concurrent;
using System.Text;
@ -95,7 +95,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
{
if (StringValue.Length > 0x100)
{
Context.Device.Log.PrintError(Logging.LogClass.ServiceNv, $"{Domain}!{Name} String value size is too big!");
Logger.PrintError(LogClass.ServiceNv, $"{Domain}!{Name} String value size is too big!");
}
else
{
@ -118,7 +118,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
Context.Memory.WriteBytes(OutputPosition + 0x82, SettingBuffer);
Context.Device.Log.PrintDebug(Logging.LogClass.ServiceNv, $"Got setting {Domain}!{Name}");
Logger.PrintDebug(LogClass.ServiceNv, $"Got setting {Domain}!{Name}");
}
return NvResult.Success;
@ -144,7 +144,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
int EventId = Context.Memory.ReadInt32(InputPosition);
Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed.");
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
return NvResult.Success;
}
@ -201,7 +201,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
}
else
{
Context.Device.Log.PrintDebug(LogClass.ServiceNv, "Waiting syncpt with timeout of " + Args.Timeout + "ms...");
Logger.PrintDebug(LogClass.ServiceNv, "Waiting syncpt with timeout of " + Args.Timeout + "ms...");
using (ManualResetEvent WaitEvent = new ManualResetEvent(false))
{
@ -232,7 +232,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
}
}
Context.Device.Log.PrintDebug(LogClass.ServiceNv, "Resuming...");
Logger.PrintDebug(LogClass.ServiceNv, "Resuming...");
}
if (Extended)