Exemplo n.º 1
0
 public static void Register(DebugLogEntry entry)
 {
     lock (m_sync)
     {
         m_last.m_next = entry;
         m_last        = entry;
     }
 }
Exemplo n.º 2
0
        public static void DumpToFile(DebugLogEntry start = null)
        {
            var first = (start == null) ? DebugLogEntry.First : start;
            var entry = first;

            using (System.IO.FileStream dump = new System.IO.FileStream(
                       System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\StepBro DebugLog.txt",
                       System.IO.FileMode.Create, System.IO.FileAccess.Write,
                       System.IO.FileShare.None))
            {
                using (System.IO.StreamWriter writer = new System.IO.StreamWriter(dump))
                {
                    while (entry != null)
                    {
                        writer.WriteLine(entry.Timestamp.ToMinutesTimestamp(first.Timestamp) + "  " + entry.ToString());
                        entry = entry.Next;
                    }
                }
            }
        }
Exemplo n.º 3
0
 static DebugLogEntry()
 {
     First = m_last = new DebugLogEntryString("DebugLog Created");
 }