Beispiel #1
0
        public void AddToLog(String Msg, Logger.MsgType Type = MsgType.Action, int MsgLevel = 0)
        {
            if (!TurnedOn)
            {
                return;
            }
            var N = new Note();

            N.Thread   = System.Threading.Thread.CurrentThread.ManagedThreadId;
            N.Time     = DateTime.Now;
            N.Type     = Type;
            N.Msg      = Msg;
            N.MsgLevel = 0;
            Notes.Add(N);
            if (Notes.Count > MAX_NOTES)
            {
                //AddToLog("Logger: MAX_NOTES Reached", MsgType.Warning);
                //lock(syncRoot)
                //{
                ExportToFile();
                //}
                return;
                //throw new Exception("Logger: Over 100000 notes in Logger");
            }
        }
Beispiel #2
0
 void Logger_OnMsg(object sender, string msg, Logger.MsgType type)
 {
     LogMsg = $"{msg} | {type} | {connectStatus}";
 }