mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 02:13:00 +08:00
Move MQTTnet.Server to dedicated repo.
This commit is contained in:
@@ -8,10 +8,12 @@ namespace MQTTnet.TestApp.NetCore
|
||||
{
|
||||
static readonly object _lock = new object();
|
||||
|
||||
public static void ForwardToConsole()
|
||||
public static void ForwardToConsole(MqttNetLogger logger)
|
||||
{
|
||||
MqttNetGlobalLogger.LogMessagePublished -= PrintToConsole;
|
||||
MqttNetGlobalLogger.LogMessagePublished += PrintToConsole;
|
||||
if (logger == null) throw new ArgumentNullException(nameof(logger));
|
||||
|
||||
logger.LogMessagePublished -= PrintToConsole;
|
||||
logger.LogMessagePublished += PrintToConsole;
|
||||
}
|
||||
|
||||
public static void PrintToConsole(string message, ConsoleColor color)
|
||||
|
||||
Reference in New Issue
Block a user