From dbc132c0da981be92d26b40e0e1d4bfc464aa4f3 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Mon, 4 Aug 2025 13:31:17 -0500 Subject: [PATCH] fix: set default debug levels if not found --- src/PepperDash.Core/Logging/Debug.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PepperDash.Core/Logging/Debug.cs b/src/PepperDash.Core/Logging/Debug.cs index 18202aa4..4e248807 100644 --- a/src/PepperDash.Core/Logging/Debug.cs +++ b/src/PepperDash.Core/Logging/Debug.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Net; using System.Reflection; using System.Text.RegularExpressions; using Crestron.SimplSharp; @@ -19,7 +20,6 @@ using Serilog.Templates; namespace PepperDash.Core { /// - /// Contains debug commands for use in various situations /// public static class Debug { @@ -272,6 +272,9 @@ namespace PepperDash.Core if (result != CrestronDataStore.CDS_ERROR.CDS_SUCCESS) { CrestronConsole.Print($"Unable to retrieve stored log level for {levelStoreKey}.\r\nError: {result}.\r\nSetting level to {LogEventLevel.Information}\r\n"); + + CrestronDataStoreStatic.SetLocalIntValue(levelStoreKey, (int)LogEventLevel.Information); + return LogEventLevel.Information; }