updating the nuget package results in an exception because the MongoClientSettings has no LoggingSettings set in my case.
head of the stack trace:
System.ArgumentNullException: Value cannot be null. (Parameter 'factory')
at System.ThrowHelper.Throw(String paramName)
at Microsoft.Extensions.Logging.LoggerFactoryExtensions.CreateLogger[T](ILoggerFactory factory)
at MongoDB.Driver.Core.Clusters.ClusterFactory.<ProcessClusterEnvironment>g__LogIfExternalEnvironment|9_2(String host, String environment, String documentationUrl, String[] suffixes)
at MongoDB.Driver.Core.Clusters.ClusterFactory.<ProcessClusterEnvironment>g__LogIfCosmosDB|9_0(String host)
at MongoDB.Driver.Core.Clusters.ClusterFactory.ProcessClusterEnvironment(ClusterSettings settings)
at MongoDB.Driver.Core.Clusters.ClusterFactory.CreateCluster()
at MongoDB.Driver.Core.Configuration.ClusterBuilder.BuildCluster()
at MongoDB.Driver.ClusterRegistry.CreateCluster(ClusterKey clusterKey)
at MongoDB.Driver.ClusterRegistry.GetOrCreateCluster(ClusterKey clusterKey)
at MongoDB.Driver.MongoClient..ctor(MongoClientSettings settings)
...
i can fix that with: mongoClientSettings.LoggingSettings = new(new LoggerFactory());
but this seems not te be excpected behaviour to me.
Thank you for your feedback.
Yes, you are right, this is not the expected behavior. We already working on the fix. Please refer to the CSHARP-4870 Jira ticket for more updates.