1 instantiation of FakeLogRecord
Microsoft.Extensions.Diagnostics.Testing (1)
Logging\FakeLogger.cs (1)
70
var record = new
FakeLogRecord
(logLevel, eventId, ConsumeTState(state), exception, formatter(state, exception),
75 references to FakeLogRecord
Aspire.Playground.Tests (5)
Infrastructure\DistributedApplicationExtensions.cs (5)
111
public static (IReadOnlyList<
FakeLogRecord
> AppHostLogs, IReadOnlyList<
FakeLogRecord
> ResourceLogs) GetLogs(this DistributedApplication app)
154
static void AssertDoesNotContain(IReadOnlyList<
FakeLogRecord
> logs, Func<
FakeLogRecord
, bool> predicate)
156
foreach (
var
log in logs)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (7)
Logging\AcceptanceTests.cs (1)
366
var
lastRecord = logCollector.LatestRecord;
Logging\AcceptanceTests.Mvc.cs (5)
72
var
logRecord = logCollector.LatestRecord;
107
var
logRecord = logCollector.LatestRecord;
153
var
logRecord = logCollector.LatestRecord;
197
var
logRecord = logCollector.LatestRecord;
238
var
logRecord = logCollector.LatestRecord;
Logging\AcceptanceTests.Routing.cs (1)
72
var
logRecord = logCollector.LatestRecord;
Microsoft.Extensions.Diagnostics.Testing (11)
Logging\FakeLogCollector.cs (4)
19
private readonly List<
FakeLogRecord
> _records = [];
67
public IReadOnlyList<
FakeLogRecord
> GetSnapshot(bool clear = false)
88
public
FakeLogRecord
LatestRecord
109
internal void AddRecord(
FakeLogRecord
record)
Logging\FakeLogCollectorDebugView.cs (1)
22
public IReadOnlyList<
FakeLogRecord
> Records => _collector.GetSnapshot();
Logging\FakeLogCollectorOptions.cs (2)
64
public Func<
FakeLogRecord
, string> OutputFormatter { get; set; } =
FakeLogRecord
.Formatter;
Logging\FakeLogger.cs (2)
70
var
record = new FakeLogRecord(logLevel, eventId, ConsumeTState(state), exception, formatter(state, exception),
101
public
FakeLogRecord
LatestRecord => Collector.LatestRecord;
Logging\FakeLogRecord.cs (2)
17
/// Initializes a new instance of the <see cref="
FakeLogRecord
"/> class.
133
internal static string Formatter(
FakeLogRecord
record)
Microsoft.Extensions.Http.Diagnostics.Tests (17)
Logging\AcceptanceTests.cs (10)
42
var
logRecord = Assert.Single(collector.GetSnapshot());
115
var
logRecord = collector.GetSnapshot().Single(logRecord => logRecord.Category == LoggingCategory);
172
var
logRecord = collector.GetSnapshot().Single(l => l.Category == LoggingCategory);
258
var
logRecord = collector.GetSnapshot().Single(l => l.Category == LoggingCategory);
323
var
logRecord = collector.GetSnapshot().Single(logRecord => logRecord.Category == LoggingCategory);
366
var
logRecord = collector.GetSnapshot().Single(logRecord => logRecord.Category == LoggingCategory);
435
var
logRecord = collector.GetSnapshot().Single(logRecord => logRecord.Category == LoggingCategory);
595
var
logRecord = collector.GetSnapshot().Single(l => l.Category == LoggingCategory);
644
var
logRecord = collector.GetSnapshot().Single(l => l.Category == LoggingCategory);
696
var
logRecord = collector.GetSnapshot().Single(l => l.Category == LoggingCategory);
Logging\HttpClientLoggerTest.cs (6)
241
var
logRecord = Assert.Single(logRecords);
440
var
logRecord = Assert.Single(logRecords);
557
var
logRecord = Assert.Single(logRecords);
647
var
logRecord = Assert.Single(logRecords);
966
var
logRecord = fakeLogger.Collector.GetSnapshot().Single();
987
var
logRecord = Assert.Single(logRecords);
Logging\Internal\LogRecordExtensions.cs (1)
15
public static Dictionary<string, string?> GetStructuredState(this
FakeLogRecord
logRecord)
Microsoft.Gen.Logging.Generated.Tests (35)
LogMethodTests.cs (4)
281
var
logRecord = collector.LatestRecord;
377
var
logRecord = collector.LatestRecord;
574
var
logRecord = collector.LatestRecord;
738
var
record = Assert.Single(collector.GetSnapshot());
LogPropertiesTests.cs (9)
364
var
latestRecord = _logger.Collector.LatestRecord;
388
var
latestRecord = _logger.Collector.LatestRecord;
418
var
latestRecord = _logger.Collector.LatestRecord;
447
var
latestRecord = _logger.Collector.LatestRecord;
471
var
latestRecord = _logger.Collector.LatestRecord;
498
var
latestRecord = _logger.Collector.LatestRecord;
522
var
latestRecord = _logger.Collector.LatestRecord;
547
var
latestRecord = _logger.Collector.LatestRecord;
573
var
latestRecord = _logger.Collector.LatestRecord;
SensitiveRecordTests.cs (5)
19
var
logRecord = Assert.Single(logger.FakeLogCollector.GetSnapshot());
31
var
logRecord = Assert.Single(logger.FakeLogCollector.GetSnapshot());
48
var
logRecord = Assert.Single(logger.FakeLogCollector.GetSnapshot());
65
var
logRecord = Assert.Single(logger.FakeLogCollector.GetSnapshot());
82
var
logRecord = Assert.Single(logger.FakeLogCollector.GetSnapshot());
TagProviderTests.cs (17)
33
var
latestRecord = _logger.Collector.LatestRecord;
56
var
latestRecord = _logger.Collector.LatestRecord;
81
var
latestRecord = _logger.Collector.LatestRecord;
104
var
latestRecord = _logger.Collector.LatestRecord;
125
var
latestRecord = _logger.Collector.LatestRecord;
162
var
latestRecord = _logger.Collector.LatestRecord;
186
var
latestRecord = _logger.Collector.LatestRecord;
207
var
latestRecord = _logger.Collector.LatestRecord;
226
var
latestRecord = _logger.Collector.LatestRecord;
246
var
latestRecord = _logger.Collector.LatestRecord;
268
var
latestRecord = _logger.Collector.LatestRecord;
289
var
latestRecord = _logger.Collector.LatestRecord;
310
var
latestRecord = _logger.Collector.LatestRecord;
330
var
latestRecord = _logger.Collector.LatestRecord;
357
var
latestRecord = _logger.Collector.LatestRecord;
395
var
latestRecord = _logger.Collector.LatestRecord;
420
var
latestRecord = _logger.Collector.LatestRecord;