public MqttBrokerStart()
 {
     CrestronLogger.Mode = LoggerModeEnum.DEFAULT;
     CrestronLogger.PrintTheLog(true);
     CrestronLogger.Initialize(10);
     CrestronLogger.LogOnlyCurrentDebugLevel = false;
 }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        public static void ShowDebugLog(string s)
        {
            var loglist = CrestronLogger.PrintTheLog(s.ToLower() == "all");

            foreach (var l in loglist)
            {
                CrestronConsole.ConsoleCommandResponse(l + CrestronEnvironment.NewLine);
            }
        }
        /// <summary>
        /// Set the value of the CrestronLogger.PrintTheLog to true or false.
        /// </summary>
        /// <param name="val"> val = 0 equal false , val = 1 equals true</param>
        public void Log(ushort val)
        {
            bool printTheLog = val == 0 ? false : true;

            CrestronLogger.PrintTheLog(printTheLog);
            if (!printTheLog)
            {
                CrestronLogger.ShutdownLogger();
            }
            else if (!CrestronLogger.LoggerInitialized)
            {
                CrestronLogger.Initialize(10);
                CrestronLogger.LogOnlyCurrentDebugLevel = false;
            }
        }