Changeset 434 for binary-improvements2/WebServer/src/LogBuffer.cs
- Timestamp:
- May 17, 2023, 11:05:59 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/WebServer/src/LogBuffer.cs
r391 r434 64 64 lock (logEntries) { 65 65 logEntries.Add (le); 66 if (logEntries.Count > maxEntries) { 67 listOffset += logEntries.Count - maxEntries; 68 logEntries.RemoveRange (0, logEntries.Count - maxEntries); 66 if (logEntries.Count <= maxEntries) { 67 return; 69 68 } 69 70 listOffset += logEntries.Count - maxEntries; 71 logEntries.RemoveRange (0, logEntries.Count - maxEntries); 70 72 } 71 73 } … … 124 126 125 127 public class LogEntry { 126 public readonly DateTime timestamp;127 public readonly string isoTime;128 public readonly string message;129 public readonly string trace;130 public readonly LogType type;131 public readonly long uptime;128 public readonly DateTime Timestamp; 129 public readonly string IsoTime; 130 public readonly string Message; 131 public readonly string Trace; 132 public readonly LogType Type; 133 public readonly long Uptime; 132 134 133 135 public LogEntry (DateTime _timestamp, string _message, string _trace, LogType _type, long _uptime) { 134 timestamp = _timestamp;135 isoTime = _timestamp.ToString ("o");136 Timestamp = _timestamp; 137 IsoTime = _timestamp.ToString ("o"); 136 138 137 message = _message;138 trace = _trace;139 type = _type;140 uptime = _uptime;139 Message = _message; 140 Trace = _trace; 141 Type = _type; 142 Uptime = _uptime; 141 143 } 142 144 }
Note:
See TracChangeset
for help on using the changeset viewer.