feat: improments to setting debug level from console

This commit is contained in:
Neil Dorin
2023-11-23 11:28:25 -07:00
parent 65800193bb
commit 5b2453c2cc
2 changed files with 14 additions and 2 deletions

View File

@@ -123,7 +123,7 @@ namespace PepperDash.Core.Config
else
merged.Add("global", template["global"]);
Debug.Console(2, "MERGED CONFIG RESULT: \x0d\x0a{0}", merged);
//Debug.Console(2, "MERGED CONFIG RESULT: \x0d\x0a{0}", merged);
return merged;
}

View File

@@ -250,9 +250,21 @@ namespace PepperDash.Core
{
try
{
if (levelString.Trim() == "?")
{
CrestronConsole.ConsoleCommandResponse(
$@"Used to set the minimum level of debug messages to be printed to the console:
{eDebugLevel.Information.ToString()} = {eDebugLevel.Information}
{eDebugLevel.Warning.ToString()} = {eDebugLevel.Warning}
{eDebugLevel.Error.ToString()} = {eDebugLevel.Error}
{eDebugLevel.Fatal.ToString()} = {eDebugLevel.Fatal}
{eDebugLevel.Debug.ToString()} = {eDebugLevel.Debug}
{eDebugLevel.Verbose.ToString()} = {eDebugLevel.Verbose}");
}
if (string.IsNullOrEmpty(levelString.Trim()))
{
CrestronConsole.ConsoleCommandResponse("AppDebug level = {0}", _consoleLoggingLevelSwitch);
CrestronConsole.ConsoleCommandResponse("AppDebug level = {0}", _consoleLoggingLevelSwitch.MinimumLevel);
return;
}