@@ -82,7 +82,7 @@ protected override void Dispose(bool disposing)
8282 {
8383 if ( disposing )
8484 {
85- _clusterEventsLogger . LogAndPublish ( new ClusterClosingEvent ( ClusterId ) ) ;
85+ _clusterEventLogger . LogAndPublish ( new ClusterClosingEvent ( ClusterId ) ) ;
8686
8787 stopwatch = Stopwatch . StartNew ( ) ;
8888 _monitorServersCancellationTokenSource . Cancel ( ) ;
@@ -103,7 +103,7 @@ protected override void Dispose(bool disposing)
103103
104104 if ( stopwatch != null )
105105 {
106- _clusterEventsLogger . LogAndPublish ( new ClusterClosedEvent ( ClusterId , stopwatch . Elapsed ) ) ;
106+ _clusterEventLogger . LogAndPublish ( new ClusterClosedEvent ( ClusterId , stopwatch . Elapsed ) ) ;
107107 }
108108 }
109109
@@ -112,7 +112,7 @@ public override void Initialize()
112112 base . Initialize ( ) ;
113113 if ( _state . TryChange ( State . Initial , State . Open ) )
114114 {
115- _clusterEventsLogger . LogAndPublish ( new ClusterOpeningEvent ( ClusterId , Settings ) ) ;
115+ _clusterEventLogger . LogAndPublish ( new ClusterOpeningEvent ( ClusterId , Settings ) ) ;
116116
117117 var stopwatch = Stopwatch . StartNew ( ) ;
118118
@@ -145,7 +145,7 @@ public override void Initialize()
145145 server . Initialize ( ) ;
146146 }
147147
148- _clusterEventsLogger . LogAndPublish ( new ClusterOpenedEvent ( ClusterId , Settings , stopwatch . Elapsed ) ) ;
148+ _clusterEventLogger . LogAndPublish ( new ClusterOpenedEvent ( ClusterId , Settings , stopwatch . Elapsed ) ) ;
149149
150150 if ( Settings . Scheme == ConnectionStringScheme . MongoDBPlusSrv )
151151 {
@@ -236,7 +236,7 @@ private void ServerDescriptionChangedHandler(object sender, ServerDescriptionCha
236236 catch ( Exception unexpectedException )
237237 {
238238 // if we catch an exception here it's because of a bug in the driver
239- _clusterEventsLogger . LogAndPublish ( new SdamInformationEvent (
239+ _clusterEventLogger . LogAndPublish ( new SdamInformationEvent (
240240 "Unexpected exception in MultiServerCluster.ServerDescriptionChangedHandler: {0}" ,
241241 unexpectedException ) ,
242242 unexpectedException ) ;
@@ -362,7 +362,7 @@ private ClusterDescription ProcessReplicaSetChange(ClusterDescription clusterDes
362362 var server = _servers . SingleOrDefault ( x => EndPointHelper . Equals ( args . NewServerDescription . EndPoint , x . EndPoint ) ) ;
363363 server . Invalidate ( "ReportedPrimaryIsStale" , args . NewServerDescription . TopologyVersion ) ;
364364
365- _clusterEventsLogger . LogAndPublish ( new SdamInformationEvent (
365+ _clusterEventLogger . LogAndPublish ( new SdamInformationEvent (
366366 @"Invalidating server: Setting ServerType to ""Unknown"" for {0} because it " +
367367 @"claimed to be the replica set primary for replica set ""{1}"" but sent a " +
368368 @"(setVersion, electionId) tuple of ({2}, {3}) that was less than than the " +
@@ -384,7 +384,7 @@ private ClusterDescription ProcessReplicaSetChange(ClusterDescription clusterDes
384384 {
385385 if ( _maxElectionInfo == null )
386386 {
387- _clusterEventsLogger . LogAndPublish ( new SdamInformationEvent (
387+ _clusterEventLogger . LogAndPublish ( new SdamInformationEvent (
388388 @"Initializing (maxSetVersion, maxElectionId): Saving tuple " +
389389 @"(setVersion, electionId) of ({0}, {1}) as (maxSetVersion, maxElectionId) for " +
390390 @"replica set ""{2}"" because replica set primary {3} sent ({0}, {1}), the first " +
@@ -404,7 +404,7 @@ private ClusterDescription ProcessReplicaSetChange(ClusterDescription clusterDes
404404 if ( _maxElectionInfo . SetVersion < args . NewServerDescription . ReplicaSetConfig . Version . Value )
405405 {
406406 var electionId = args . NewServerDescription . ElectionId ?? _maxElectionInfo . ElectionId ;
407- _clusterEventsLogger . LogAndPublish ( new SdamInformationEvent (
407+ _clusterEventLogger . LogAndPublish ( new SdamInformationEvent (
408408 @"Updating stale setVersion: Updating the current " +
409409 @"(maxSetVersion, maxElectionId) tuple from ({0}, {1}) to ({2}, {3}) for " +
410410 @"replica set ""{4}"" because replica set primary {5} sent ({6}, {7})—a larger " +
@@ -424,7 +424,7 @@ private ClusterDescription ProcessReplicaSetChange(ClusterDescription clusterDes
424424 }
425425 else // current primary is stale & setVersion is not stale ⇒ the electionId must be stale
426426 {
427- _clusterEventsLogger . LogAndPublish ( new SdamInformationEvent (
427+ _clusterEventLogger . LogAndPublish ( new SdamInformationEvent (
428428 @"Updating stale electionId: Updating the current " +
429429 @"(maxSetVersion, maxElectionId) tuple from ({0}, {1}) to ({2}, {3}) for " +
430430 @"replica set ""{4}"" because replica set primary {5} sent ({6}, {7})—" +
@@ -583,7 +583,7 @@ private ClusterDescription EnsureServer(ClusterDescription clusterDescription, E
583583 return clusterDescription ;
584584 }
585585
586- _clusterEventsLogger . LogAndPublish ( new ClusterAddingServerEvent ( ClusterId , endPoint ) ) ;
586+ _clusterEventLogger . LogAndPublish ( new ClusterAddingServerEvent ( ClusterId , endPoint ) ) ;
587587
588588 stopwatch . Start ( ) ;
589589 server = CreateServer ( endPoint ) ;
@@ -595,7 +595,7 @@ private ClusterDescription EnsureServer(ClusterDescription clusterDescription, E
595595 clusterDescription = clusterDescription . WithServerDescription ( server . Description ) ;
596596 stopwatch . Stop ( ) ;
597597
598- _clusterEventsLogger . LogAndPublish ( new ClusterAddedServerEvent ( server . ServerId , stopwatch . Elapsed ) ) ;
598+ _clusterEventLogger . LogAndPublish ( new ClusterAddedServerEvent ( server . ServerId , stopwatch . Elapsed ) ) ;
599599
600600 return clusterDescription ;
601601 }
@@ -636,7 +636,7 @@ private ClusterDescription RemoveServer(ClusterDescription clusterDescription, E
636636 return clusterDescription ;
637637 }
638638
639- _clusterEventsLogger . LogAndPublish ( new ClusterRemovingServerEvent ( server . ServerId , reason ) ) ;
639+ _clusterEventLogger . LogAndPublish ( new ClusterRemovingServerEvent ( server . ServerId , reason ) ) ;
640640
641641 stopwatch . Start ( ) ;
642642 _servers . Remove ( server ) ;
@@ -646,7 +646,7 @@ private ClusterDescription RemoveServer(ClusterDescription clusterDescription, E
646646 server . Dispose ( ) ;
647647 stopwatch . Stop ( ) ;
648648
649- _clusterEventsLogger . LogAndPublish ( new ClusterRemovedServerEvent ( server . ServerId , reason , stopwatch . Elapsed ) ) ;
649+ _clusterEventLogger . LogAndPublish ( new ClusterRemovedServerEvent ( server . ServerId , reason , stopwatch . Elapsed ) ) ;
650650
651651 return clusterDescription . WithoutServerDescription ( endPoint ) ;
652652 }
0 commit comments