Example #1
0
 /// <summary>Makes copies of the log records from <paramref name="srcAggregator"/>.</summary>
 /// <remarks>Does a deep copy of every record.</remarks>
 /// <param name="srcAggregator">An aggregator to get log records from.</param>
 public void LoadLogs(BaseLogAggregator srcAggregator)
 {
     ClearAllLogs();
     foreach (var log in srcAggregator.GetLogRecords())
     {
         AggregateLogRecord(log);
     }
 }
Example #2
0
        /// <summary>Populates <see cref="logsToShow"/> and stats numbers.</summary>
        /// <remarks>Current aggregator is determined from <see cref="logShowMode"/> and
        /// <see cref="logUpdateIsPaused"/></remarks>
        /// <param name="forceUpdate">If <c>false</c> then logs view will only be updated if there were
        /// newly aggregated records in teh current aggregator.</param>
        private void UpdateLogsView(bool forceUpdate = false)
        {
            BaseLogAggregator currentAggregator = GetCurrentAggregator();

            if (currentAggregator.FlushBufferedLogs() || logsViewChanged || forceUpdate)
            {
                logsToShow    = currentAggregator.GetLogRecords();
                infoLogs      = currentAggregator.infoLogsCount;
                warningLogs   = currentAggregator.warningLogsCount;
                errorLogs     = currentAggregator.errorLogsCount;
                exceptionLogs = currentAggregator.exceptionLogsCount;
            }
            logsViewChanged = false;
        }