public void Log(ActinLog log) { var mustPrint = false; lock (lockEverything) { if (m_LogToDisk && logFolderPath.Value != null) { lock (lockRealTimeCache) { while (realTimeCache.Count > maxRealTimeLogs) { realTimeCache.Dequeue(); } realTimeCache.Enqueue(log); } queuedLogs.Add(log); } else { mustPrint = true; } } if (mustPrint) { Console.WriteLine(log.ToString()); } }
public void Log(ActinLog log) { log = log.WithNoNulls(); //TODO: Store X number of logs... }