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
|
@ -532,7 +532,7 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 0 || configurationFileFormat.Version > ConfigurationFileFormat.CurrentVersion)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Unsupported configuration version {configurationFileFormat.Version}, loading default.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Unsupported configuration version {configurationFileFormat.Version}, loading default.");
|
||||
|
||||
LoadDefault();
|
||||
|
||||
|
@ -541,7 +541,7 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 2)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 2.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 2.");
|
||||
|
||||
configurationFileFormat.SystemRegion = Region.USA;
|
||||
|
||||
|
@ -550,7 +550,7 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 3)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 3.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 3.");
|
||||
|
||||
configurationFileFormat.SystemTimeZone = "UTC";
|
||||
|
||||
|
@ -559,7 +559,7 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 4)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 4.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 4.");
|
||||
|
||||
configurationFileFormat.MaxAnisotropy = -1;
|
||||
|
||||
|
@ -568,7 +568,7 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 5)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 5.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 5.");
|
||||
|
||||
configurationFileFormat.SystemTimeOffset = 0;
|
||||
|
||||
|
@ -577,7 +577,7 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 6)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 6.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 6.");
|
||||
|
||||
configurationFileFormat.ControllerConfig = new List<ControllerConfig>();
|
||||
configurationFileFormat.KeyboardConfig = new List<KeyboardConfig>
|
||||
|
@ -630,7 +630,7 @@ namespace Ryujinx.Configuration
|
|||
// Only needed for version 6 configurations.
|
||||
if (configurationFileFormat.Version == 6)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 7.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 7.");
|
||||
|
||||
for (int i = 0; i < configurationFileFormat.KeyboardConfig.Count; i++)
|
||||
{
|
||||
|
@ -643,7 +643,7 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 8)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 8.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 8.");
|
||||
|
||||
configurationFileFormat.EnablePtc = false;
|
||||
|
||||
|
@ -652,7 +652,7 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 9)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 9.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 9.");
|
||||
|
||||
configurationFileFormat.ColumnSort = new ColumnSort
|
||||
{
|
||||
|
@ -670,7 +670,7 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 10)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 10.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 10.");
|
||||
|
||||
configurationFileFormat.AudioBackend = AudioBackend.OpenAl;
|
||||
|
||||
|
@ -679,7 +679,7 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 11)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 11.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 11.");
|
||||
|
||||
configurationFileFormat.ResScale = 1;
|
||||
configurationFileFormat.ResScaleCustom = 1.0f;
|
||||
|
@ -689,7 +689,7 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 12)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 12.");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 12.");
|
||||
|
||||
configurationFileFormat.LoggingGraphicsDebugLevel = GraphicsDebugLevel.None;
|
||||
|
||||
|
@ -750,7 +750,7 @@ namespace Ryujinx.Configuration
|
|||
{
|
||||
ToFileFormat().SaveConfig(configurationFilePath);
|
||||
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, "Configuration file has been updated!");
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, "Configuration file has been updated!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue