mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-29 09:52:55 +08:00
Improve logger performance.
This commit is contained in:
@@ -11,7 +11,7 @@ namespace MQTTnet
|
||||
{
|
||||
public sealed class MqttFactory : IMqttFactory
|
||||
{
|
||||
IMqttClientAdapterFactory _clientAdapterFactory = new MqttClientAdapterFactory();
|
||||
IMqttClientAdapterFactory _clientAdapterFactory;
|
||||
|
||||
public MqttFactory() : this(new MqttNetLogger())
|
||||
{
|
||||
@@ -20,6 +20,7 @@ namespace MQTTnet
|
||||
public MqttFactory(IMqttNetLogger logger)
|
||||
{
|
||||
DefaultLogger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
_clientAdapterFactory = new MqttClientAdapterFactory(logger);
|
||||
}
|
||||
|
||||
public IMqttNetLogger DefaultLogger { get; }
|
||||
|
||||
Reference in New Issue
Block a user