public void AddEntry(OperationLogEntry entry) { var str = entry.ToString(); if (str.StartsWith("-- BEGIN BATCH")) { } OperationLogEntry dummy; while(_entries.Count > MaxEntries) _entries.TryDequeue(out dummy); _entries.Enqueue(entry); }
public void Log(OperationLogEntry entry) { OperationLogEntry dummy; while(_entries.Count > 100) _entries.TryDequeue(out dummy); switch(entry.EntryType) { case LogEntryType.Information: case LogEntryType.Command: if(this.LogLevel == Services.LogLevel.Details) _entries.Enqueue(entry); break; case LogEntryType.Error: _entries.Enqueue(entry); break; } }
public void Log(OperationLogEntry entry) { _saveService.AddObject(entry); }