Refactor logger. (#1247)

This commit is contained in:
Christian
2021-09-26 11:05:00 +02:00
committed by GitHub
parent c756a4092f
commit 0920c86d37
70 changed files with 618 additions and 510 deletions
@@ -3,6 +3,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using MQTTnet.Adapter;
using MQTTnet.Diagnostics;
using MQTTnet.Diagnostics.Logger;
using MQTTnet.Implementations;
using MQTTnet.Server;
@@ -61,7 +62,7 @@ namespace MQTTnet.AspNetCore.Extensions
private static IServiceCollection AddHostedMqttServer(this IServiceCollection services)
{
var logger = new MqttNetLogger();
var logger = new MqttNetEventLogger();
services.AddSingleton<IMqttNetLogger>(logger);
services.AddSingleton<MqttHostedServer>();