refactor: Rename LocalConfigPresent to LocalConfigPresentBanner and enhance debug logging in ControlSystem

This commit is contained in:
Neil Dorin 2026-05-07 11:00:49 -06:00
parent ff1393b768
commit 9a385eef96
3 changed files with 10 additions and 9 deletions

View file

@ -21,7 +21,7 @@ namespace PepperDash.Essentials.Core.Config;
/// <summary> /// <summary>
/// Local Config Present Message /// Local Config Present Message
/// </summary> /// </summary>
public const string LocalConfigPresent = public const string LocalConfigPresentBanner =
@" @"
*************************************************** ***************************************************
************* Using Local config file ************* ************* Using Local config file *************

View file

@ -305,7 +305,15 @@ public class EssentialsWebApi : EssentialsDevice
: $"https://{currentIp}/cws/debug"; : $"https://{currentIp}/cws/debug";
Debug.LogMessage(LogEventLevel.Information, this, "Debug App: {debugPath:l}", debugPath); Debug.LogMessage(LogEventLevel.Information, this, "Debug App: {debugPath:l}", debugPath);
Debug.LogInformation(this, "Web API initialized and ready to accept requests");
Debug.LogMessage(LogEventLevel.Information, this, new string('-', 50)); Debug.LogMessage(LogEventLevel.Information, this, new string('-', 50));
var debugAppUrl = CrestronEnvironment.DevicePlatform == eDevicePlatform.Server
? $"https://{hostname}/VirtualControl/Rooms/{InitialParametersClass.RoomId}/cws/debug"
: $"https://{currentIp}/cws/debug";
Debug.LogMessage(LogEventLevel.Information, this, "Developer Tools Web App available at: {debugAppUrl:l}", debugAppUrl);
} }
} }

View file

@ -316,8 +316,7 @@ public class ControlSystem : CrestronControlSystem, ILoadConfig, IInitialization
Debug.LogMessage(LogEventLevel.Information, "Folder structure verified. Loading config..."); Debug.LogMessage(LogEventLevel.Information, "Folder structure verified. Loading config...");
if (!ConfigReader.LoadConfig() || ConfigReader.ConfigObject == null) if (!ConfigReader.LoadConfig() || ConfigReader.ConfigObject == null)
{ {
Debug.LogMessage(LogEventLevel.Warning, "Unable to load config file. Please ensure a valid config file is present and restart the program."); Debug.LogMessage(LogEventLevel.Warning, "Unable to load config file.");
// return;
} }
CheckPluginVersionsAgainstConfig(); CheckPluginVersionsAgainstConfig();
@ -480,12 +479,6 @@ public class ControlSystem : CrestronControlSystem, ILoadConfig, IInitialization
LoadTieLines(); LoadTieLines();
/*var mobileControl = GetMobileControlDevice();
if (mobileControl == null) return;
mobileControl.LinkSystemMonitorToAppServer();*/
} }
/// <summary> /// <summary>