Merge 'development-2.0.0' into 'feature-2.0.0/fix-version-info'

This commit is contained in:
Neil Dorin
2024-05-29 12:10:34 -06:00
81 changed files with 1905 additions and 1035 deletions

View File

@@ -14,6 +14,7 @@ using PepperDash.Essentials.Core.Web;
using System;
using System.Linq;
using Serilog.Events;
using PepperDash.Essentials.Core.Routing;
namespace PepperDash.Essentials
{
@@ -34,6 +35,8 @@ namespace PepperDash.Essentials
SecretsManager.Initialize();
SystemMonitor.ProgramInitialization.ProgramInitializationUnderUserControl = true;
Debug.SetErrorLogMinimumDebugLevel(CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance ? LogEventLevel.Warning : LogEventLevel.Verbose);
// AppDomain.CurrentDomain.AssemblyResolve += CurrentDomainOnAssemblyResolve;
}
@@ -89,6 +92,8 @@ namespace PepperDash.Essentials
private void StartSystem(object preventInitialization)
{
Debug.SetErrorLogMinimumDebugLevel(Serilog.Events.LogEventLevel.Verbose);
DeterminePlatform();
if (Debug.DoNotLoadConfigOnNextBoot)
@@ -162,7 +167,7 @@ namespace PepperDash.Essentials
{
try
{
Debug.LogMessage(LogEventLevel.Information, "Determining Platform...");
Debug.LogMessage(LogEventLevel.Information, "Determining Platform...");
string filePathPrefix;
@@ -236,7 +241,7 @@ namespace PepperDash.Essentials
}
catch (Exception e)
{
Debug.LogMessage(LogEventLevel.Error, "Unable to determin platform due to exception: {exception}", e.Message);
Debug.LogMessage(e, "Unable to determine platform due to exception");
}
}
@@ -292,7 +297,7 @@ namespace PepperDash.Essentials
}
catch (Exception e)
{
Debug.LogMessage(LogEventLevel.Information, "FATAL INITIALIZE ERROR. System is in an inconsistent state: {exception}", e);
Debug.LogMessage(e, "FATAL INITIALIZE ERROR. System is in an inconsistent state");
}
finally
{
@@ -382,6 +387,8 @@ namespace PepperDash.Essentials
// Build the processor wrapper class
DeviceManager.AddDevice(new Core.Devices.CrestronProcessor("processor"));
DeviceManager.AddDevice(new RoutingFeedbackManager($"routingFeedbackManager", "Routing Feedback Manager"));
// Add global System Monitor device
if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance)
{
@@ -424,7 +431,7 @@ namespace PepperDash.Essentials
}
catch (Exception e)
{
Debug.LogMessage(LogEventLevel.Information, "ERROR: Creating device {deviceKey:l}. Skipping device. \r\n{exception}", devConf.Key, e);
Debug.LogMessage(e, "ERROR: Creating device {deviceKey:l}. Skipping device.",args: new[] { devConf.Key });
}
}
Debug.LogMessage(LogEventLevel.Information, "All Devices Loaded.");