示例#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
        }
示例#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);
            }
        }
示例#3
0
文件: Program.cs 项目: temur03/imBMW
 static void Logger_Logged(LoggerArgs args)
 {
     Debug.Print(args.LogString);
 }
示例#4
0
 static void Logger_Logged(LoggerArgs args)
 {
     queue.Enqueue(args.LogString);
 }
示例#5
0
 static void Logger_Logged(LoggerArgs args)
 {
     queue.Enqueue(args.LogString);
 }
示例#6
0
文件: Program.cs 项目: temur03/imBMW
 static void Logger_Logged(LoggerArgs args)
 {
     if (args.Priority == Tools.LogPriority.Error)
     {
         // store errors to arraylist
         error = true;
         RefreshLEDs();
     }
     Debug.Print(args.LogString);
 }