Esempio n. 1
0
 /// <summary>Adds a new log record to the aggregation.</summary>
 /// <remarks>Parent calls this method when it wants a record to be counted. It's up to the
 /// implementation what to do with the record.</remarks>
 /// <param name="logRecord">A log from the <see cref="LogInterceptor"/>. Do NOT store this
 /// instance! If tjhis log record needs to be stored make a copy via <see cref="LogRecord"/>
 /// constructor.</param>
 protected abstract void AggregateLogRecord(LogRecord logRecord);
Esempio n. 2
0
        /// <summary>Verifies if the log record matches the quick filter criteria.</summary>
        /// <remarks>The quick filter string is a case-insensitive prefix of the log's source.</remarks>
        /// <param name="log">The log record to verify.</param>
        /// <returns><c>true</c> if this log passes the quick filter check.</returns>
        bool LogQuickFilter(LogRecord log)
        {
            var filter = quickFilterInputEnabled ? oldQuickFilterStr : quickFilterStr;

            return(log.srcLog.source.StartsWith(filter, StringComparison.OrdinalIgnoreCase));
        }
Esempio n. 3
0
 protected override void AggregateLogRecord(LogRecord logRecord)
 {
     logRecords.AddLast(new LogRecord(logRecord));
     UpdateLogCounter(logRecord, 1);
 }