aspnetcore/src/Microsoft.AspNetCore.Socket.../NullLoggerFactory.cs

32 lines
774 B
C#

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
namespace Microsoft.AspNetCore.Sockets.Client
{
internal class NullLoggerFactory : ILoggerFactory
{
public static readonly ILoggerFactory Instance = new NullLoggerFactory();
private NullLoggerFactory()
{
}
public void AddProvider(ILoggerProvider provider)
{
}
public ILogger CreateLogger(string categoryName)
{
return NullLogger.Instance;
}
public void Dispose()
{
}
}
}