mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 11:44:54 +00:00
feat: change to use Debug.LogMessage everywhere
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.CrestronDataStore;
|
||||
using PepperDash.Core;
|
||||
using Serilog.Events;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
@@ -46,7 +47,7 @@ namespace PepperDash.Essentials.Core
|
||||
returnCode = CrestronDataStoreStatic.clearGlobal(key);
|
||||
if (returnCode == CrestronDataStore.CDS_ERROR.CDS_SUCCESS)
|
||||
{
|
||||
Debug.Console(0, this, "Successfully removed secret \"{0}\"", secret);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Successfully removed secret \"{0}\"", secret);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -56,12 +57,12 @@ namespace PepperDash.Essentials.Core
|
||||
returnCode = CrestronDataStoreStatic.SetGlobalStringValue(key, secret);
|
||||
if (returnCode == CrestronDataStore.CDS_ERROR.CDS_SUCCESS)
|
||||
{
|
||||
Debug.Console(0, this, "Successfully set secret \"{0}\"", secret);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Successfully set secret \"{0}\"", secret);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Unable to set secret for {0}:{1} - {2}", Key, key, returnCode.ToString());
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Unable to set secret for {0}:{1} - {2}", Key, key, returnCode.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -78,10 +79,10 @@ namespace PepperDash.Essentials.Core
|
||||
switch (getErrorCode)
|
||||
{
|
||||
case CrestronDataStore.CDS_ERROR.CDS_SUCCESS:
|
||||
Debug.Console(2, this, "Secret Successfully retrieved for {0}:{1}", Key, key);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Secret Successfully retrieved for {0}:{1}", Key, key);
|
||||
return new CrestronSecret(key, mySecret, this);
|
||||
default:
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Unable to retrieve secret for {0}:{1} - {2}",
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Unable to retrieve secret for {0}:{1} - {2}",
|
||||
Key, key, getErrorCode.ToString());
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user