Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ namespace Microsoft.Extensions.Logging.Testing;
#if NET9_0_OR_GREATER
public class FakeLogger : ILogger, IBufferedLogger
#else
#pragma warning disable LA0007
public class FakeLogger : ILogger
#pragma warning restore LA0007
#endif
{
private readonly ConcurrentDictionary<LogLevel, bool> _disabledLevels = new(); // used as a set, the value is ignored
Expand Down Expand Up @@ -185,3 +187,7 @@ public void LogRecords(IEnumerable<BufferedLogRecord> records)
}
}
}

#if !NET9_0_OR_GREATER
#pragma warning restore LA0007
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Name": "Microsoft.Extensions.Diagnostics.Testing, Version=8.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
"Name": "Microsoft.Extensions.Diagnostics.Testing, Version=10.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
"Types": [
{
"Type": "sealed class Microsoft.Extensions.Diagnostics.Metrics.Testing.CollectedMeasurement<T> where T : struct",
Expand Down Expand Up @@ -57,6 +57,10 @@
"Member": "static Microsoft.Extensions.Logging.Testing.FakeLogCollector Microsoft.Extensions.Logging.Testing.FakeLogCollector.Create(Microsoft.Extensions.Logging.Testing.FakeLogCollectorOptions options);",
"Stage": "Stable"
},
{
"Member": "System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.Logging.Testing.FakeLogRecord> Microsoft.Extensions.Logging.Testing.FakeLogCollector.GetLogsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));",
"Stage": "Experimental"
},
{
"Member": "System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.Logging.Testing.FakeLogRecord> Microsoft.Extensions.Logging.Testing.FakeLogCollector.GetSnapshot(bool clear = false);",
"Stage": "Stable"
Expand Down Expand Up @@ -87,6 +91,10 @@
"Member": "bool Microsoft.Extensions.Logging.Testing.FakeLogCollectorOptions.CollectRecordsForDisabledLogLevels { get; set; }",
"Stage": "Stable"
},
{
"Member": "System.Func<Microsoft.Extensions.Logging.Testing.FakeLogRecord, bool>? Microsoft.Extensions.Logging.Testing.FakeLogCollectorOptions.CustomFilter { get; set; }",
"Stage": "Experimental"
},
{
"Member": "System.Collections.Generic.ISet<string> Microsoft.Extensions.Logging.Testing.FakeLogCollectorOptions.FilteredCategories { get; set; }",
"Stage": "Stable"
Expand All @@ -110,7 +118,7 @@
]
},
{
"Type": "class Microsoft.Extensions.Logging.Testing.FakeLogger : Microsoft.Extensions.Logging.ILogger",
"Type": "class Microsoft.Extensions.Logging.Testing.FakeLogger : Microsoft.Extensions.Logging.ILogger, Microsoft.Extensions.Logging.Abstractions.IBufferedLogger",
"Stage": "Stable",
"Methods": [
{
Expand All @@ -136,6 +144,10 @@
{
"Member": "void Microsoft.Extensions.Logging.Testing.FakeLogger.Log<TState>(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, System.Exception? exception, System.Func<TState, System.Exception?, string> formatter);",
"Stage": "Stable"
},
{
"Member": "void Microsoft.Extensions.Logging.Testing.FakeLogger.LogRecords(System.Collections.Generic.IEnumerable<Microsoft.Extensions.Logging.Abstractions.BufferedLogRecord> records);",
"Stage": "Experimental"
}
],
"Properties": [
Expand Down
Loading