Attempts to resolve exception thrown from inside CrestronLogger.Initialize() that occurs when RM is present, but cannot be accessed for some reason.

This commit is contained in:
Neil Dorin
2019-04-02 15:38:05 -06:00
parent d075f56b2a
commit 1bd0d2df9c

View File

@@ -71,17 +71,19 @@ namespace PepperDash.Core
try
{
LoggerModeEnum loggerMode = LoggerModeEnum.DEFAULT;
if (InitialParametersClass.NumberOfRemovableDrives > 0)
loggerMode = LoggerModeEnum.RM;
CrestronLogger.Initialize(2, loggerMode); // Use RM instead of DEFAULT as not to double-up console messages
{
CrestronConsole.PrintLine("{0} RM Drive(s) Present.", InitialParametersClass.NumberOfRemovableDrives);
CrestronLogger.Initialize(2, LoggerModeEnum.DEFAULT); // Use RM instead of DEFAULT as not to double-up console messages.
}
else
CrestronConsole.PrintLine("No RM Drive(s) Present.");
}
catch (Exception e)
{
CrestronConsole.Print("Error Initilizing Crestron Logger: {0}", e);
}
CrestronConsole.PrintLine("Initializing of CrestronLogger failed: {0}", e);
}
}
/// <summary>