Skip to content

Commit 3eea4ee

Browse files
authored
Merge pull request #154 from aspnet/ajbaaska/logging
Using NullLogger types from Logging.Abstractions
2 parents 8e87ba7 + df0d4cb commit 3eea4ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/Microsoft.AspNetCore.Session.Tests/SessionTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.Extensions.DependencyInjection;
1717
using Microsoft.Extensions.Internal;
1818
using Microsoft.Extensions.Logging;
19+
using Microsoft.Extensions.Logging.Abstractions;
1920
using Microsoft.Extensions.Logging.Testing;
2021
using Microsoft.Net.Http.Headers;
2122
using Xunit;
@@ -417,7 +418,7 @@ public async Task RefreshesSession_WhenSessionData_IsNotModified()
417418
})
418419
.ConfigureServices(services =>
419420
{
420-
services.AddSingleton(typeof(ILoggerFactory), new NullLoggerFactory());
421+
services.AddSingleton(typeof(ILoggerFactory), NullLoggerFactory.Instance);
421422
services.AddDistributedMemoryCache();
422423
services.AddSession(o => o.IdleTimeout = TimeSpan.FromMinutes(20));
423424
services.Configure<MemoryCacheOptions>(o => o.Clock = clock);

0 commit comments

Comments
 (0)