@@ -374,26 +374,24 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> {
374
374
375
375
/** @internal */
376
376
private checkForNonGenuineHosts ( ) {
377
- if ( this . mongoLogger && this . mongoLogger . logDestination ) {
378
- const documentDBHostnames = this [ kOptions ] . hosts . filter ( ( hostAddress : HostAddress ) =>
379
- isHostMatch ( DOCUMENT_DB_CHECK , hostAddress . host )
380
- ) ;
377
+ const documentDBHostnames = this [ kOptions ] . hosts . filter ( ( hostAddress : HostAddress ) =>
378
+ isHostMatch ( DOCUMENT_DB_CHECK , hostAddress . host )
379
+ ) ;
381
380
382
- const srvHostIsDocumentDB = isHostMatch ( DOCUMENT_DB_CHECK , this [ kOptions ] . srvHost ) ;
381
+ const srvHostIsDocumentDB = isHostMatch ( DOCUMENT_DB_CHECK , this [ kOptions ] . srvHost ) ;
383
382
384
- if ( documentDBHostnames . length !== 0 || srvHostIsDocumentDB ) {
385
- this . mongoLogger . info ( 'client' , DOCUMENT_DB_MSG ) ;
386
- }
383
+ if ( documentDBHostnames . length !== 0 || srvHostIsDocumentDB ) {
384
+ this . mongoLogger . info ( 'client' , DOCUMENT_DB_MSG ) ;
385
+ }
387
386
388
- const cosmosDBHostnames = this [ kOptions ] . hosts . filter ( ( hostAddress : HostAddress ) =>
389
- isHostMatch ( COSMOS_DB_CHECK , hostAddress . host )
390
- ) ;
387
+ const cosmosDBHostnames = this [ kOptions ] . hosts . filter ( ( hostAddress : HostAddress ) =>
388
+ isHostMatch ( COSMOS_DB_CHECK , hostAddress . host )
389
+ ) ;
391
390
392
- const srvHostIsCosmosDB = isHostMatch ( COSMOS_DB_CHECK , this [ kOptions ] . srvHost ) ;
391
+ const srvHostIsCosmosDB = isHostMatch ( COSMOS_DB_CHECK , this [ kOptions ] . srvHost ) ;
393
392
394
- if ( cosmosDBHostnames . length !== 0 || srvHostIsCosmosDB ) {
395
- this . mongoLogger . info ( 'client' , COSMOS_DB_MSG ) ;
396
- }
393
+ if ( cosmosDBHostnames . length !== 0 || srvHostIsCosmosDB ) {
394
+ this . mongoLogger . info ( 'client' , COSMOS_DB_MSG ) ;
397
395
}
398
396
}
399
397
0 commit comments