Make logger parameters generic.

This commit is contained in:
Christian
2022-01-08 14:35:25 +01:00
parent 7a72a8d562
commit b362b2afc2
9 changed files with 140 additions and 20 deletions
@@ -35,7 +35,7 @@ namespace MQTTnet.Tests.Logger
childLogger.Verbose("Verbose");
childLogger.Info("Info");
childLogger.Warning(null, "Warning");
childLogger.Warning((Exception)null, "Warning");
childLogger.Error(null, "Error");
Assert.AreEqual(4, logMessagesCount);
@@ -55,7 +55,7 @@ namespace MQTTnet.Tests.Logger
childLogger.Verbose("Verbose");
childLogger.Info("Info");
childLogger.Warning(null, "Warning");
childLogger.Warning((Exception)null, "Warning");
childLogger.Error(null, "Error");
}
}
@@ -18,7 +18,7 @@ namespace MQTTnet.Tests.Logger
};
var sourceLogger = logger.WithSource("The_Source");
sourceLogger.Info("MESSAGE", null, null);
sourceLogger.Info("MESSAGE", (object)null, (object)null);
Assert.AreEqual("The_Source", logMessage.Source);
}