Changeset 325 for binary-improvements/MapRendering/Web/LogBuffer.cs
- Timestamp:
- Sep 4, 2018, 1:00:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/LogBuffer.cs
r270 r325 2 2 using System.Collections.Generic; 3 3 using System.Text.RegularExpressions; 4 5 4 using UnityEngine; 6 5 7 namespace AllocsFixes.NetConnections.Servers.Web 8 { 6 namespace AllocsFixes.NetConnections.Servers.Web { 9 7 public class LogBuffer { 10 8 private const int MAX_ENTRIES = 3000; 11 9 private static LogBuffer instance; 10 11 private static readonly Regex logMessageMatcher = 12 new Regex (@"^([0-9]{4}-[0-9]{2}-[0-9]{2})T([0-9]{2}:[0-9]{2}:[0-9]{2}) ([0-9]+[,.][0-9]+) [A-Z]+ (.*)$"); 13 14 private readonly List<LogEntry> logEntries = new List<LogEntry> (); 15 16 private int listOffset; 17 18 private LogBuffer () { 19 Logger.Main.LogCallbacks += LogCallback; 20 } 12 21 13 22 public static LogBuffer Instance { … … 16 25 instance = new LogBuffer (); 17 26 } 27 18 28 return instance; 19 29 } 20 30 } 21 22 private static Regex logMessageMatcher = new Regex (@"^([0-9]{4}-[0-9]{2}-[0-9]{2})T([0-9]{2}:[0-9]{2}:[0-9]{2}) ([0-9]+[,.][0-9]+) [A-Z]+ (.*)$");23 private List<LogEntry> logEntries = new List<LogEntry> ();24 private int listOffset = 0;25 31 26 32 public int OldestLine { … … 55 61 } 56 62 } 63 57 64 return null; 58 65 } 59 }60 61 private LogBuffer () {62 Logger.Main.LogCallbacks += LogCallback;63 66 } 64 67 … … 123 126 public class LogEntry { 124 127 public string date; 128 public string message; 125 129 public string time; 126 public string uptime;127 public string message;128 130 public string trace; 129 131 public LogType type; 132 public string uptime; 130 133 } 131 134 } 132 135 } 133
Note:
See TracChangeset
for help on using the changeset viewer.