Exemple #1
0
        static void Logger_Logged(LoggerArgs args)
        {
            if (queue.Count < queueLimit || args.Priority == LogPriority.Debug || args.Priority == LogPriority.Error)
            {
                queue.Enqueue(args.LogString);

                if (queue.Count < queueLimit - 10)
                {
                    queueLimitExceeded = false;
                }
            }
            if (queue.Count == queueLimit && !queueLimitExceeded)
            {
                queueLimitExceeded = true;
                Logger.Debug("Queue is full");
            }

#if (NETMF || OnBoardMonitorEmulator) && DebugOnRealDeviceOverFTDI
            if (System.Diagnostics.Debugger.IsAttached)
            {
                Debug.Print(args.LogString);
                Logger.FreeMemory();
            }
#endif
        }
Exemple #2
0
        public static void Log(LogPriority priority, string message, string priorityTitle = null)
        {
            var e = Logged;

            if (e != null)
            {
                var args = new LoggerArgs(priority, message, priorityTitle);
                e(args);
            }
        }
Exemple #3
0
 static void Logger_Logged(LoggerArgs args)
 {
     Debug.Print(args.LogString);
 }
Exemple #4
0
 static void Logger_Logged(LoggerArgs args)
 {
     queue.Enqueue(args.LogString);
 }
Exemple #5
0
 static void Logger_Logged(LoggerArgs args)
 {
     queue.Enqueue(args.LogString);
 }
Exemple #6
0
 static void Logger_Logged(LoggerArgs args)
 {
     if (args.Priority == Tools.LogPriority.Error)
     {
         // store errors to arraylist
         error = true;
         RefreshLEDs();
     }
     Debug.Print(args.LogString);
 }