Example #1
0
 private void Record()
 {
     while (true)
     {
         Log    l   = queue.Dequeue();
         string key = l.Title;
         string s   = l.Context;
         if (!list.ContainsKey(key))
         {
             list.Add(key, new StringBuilder());
             BeginInvoke(InitListMethod);
         }
         list[key].Append(s);
         CheckLength(key);
         BeginInvoke(AddTextMethod, key, s);
         try
         {
             sw.Write(s);
             sw.Flush();
         }
         catch (Exception e)
         {
             Warn(e);
         }
     }
 }
Example #2
0
 private void Record()
 {
     while (true)
     {
         string s = queue.Dequeue();
         try
         {
             sw.Write(s);
             sw.Flush();
         }
         catch (Exception e)
         {
             Warn(Util.MainThread, e);
         }
     }
 }