@@ -174,6 +174,7 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
174
174
* - TCP handshake
175
175
* - TLS negotiated
176
176
* - mongodb handshake (saslStart, saslContinue), includes authentication
177
+ *
177
178
* Once connection is established, command logging can log events (if enabled)
178
179
*/
179
180
public established : boolean ;
@@ -186,8 +187,6 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
186
187
private messageStream : Readable ;
187
188
private socketWrite : ( buffer : Uint8Array ) => Promise < void > ;
188
189
private clusterTime : Document | null = null ;
189
- /** @internal */
190
- override component = MongoLoggableComponent . COMMAND ;
191
190
/** @internal */
192
191
override mongoLogger : MongoLogger | undefined ;
193
192
@@ -461,7 +460,7 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
461
460
let started = 0 ;
462
461
if (
463
462
this . monitorCommands ||
464
- ( this . established && this . mongoLogger ?. willLog ( SeverityLevel . DEBUG , this . component ) )
463
+ ( this . established && this . mongoLogger ?. willLog ( SeverityLevel . DEBUG , MongoLoggableComponent . COMMAND ) )
465
464
) {
466
465
started = now ( ) ;
467
466
this . emitAndLogCommand (
@@ -490,7 +489,7 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
490
489
491
490
if (
492
491
this . monitorCommands ||
493
- ( this . established && this . mongoLogger ?. willLog ( SeverityLevel . DEBUG , this . component ) )
492
+ ( this . established && this . mongoLogger ?. willLog ( SeverityLevel . DEBUG , MongoLoggableComponent . COMMAND ) )
494
493
) {
495
494
this . emitAndLogCommand (
496
495
this . monitorCommands ,
@@ -513,7 +512,7 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
513
512
} catch ( error ) {
514
513
if (
515
514
this . monitorCommands ||
516
- ( this . established && this . mongoLogger ?. willLog ( SeverityLevel . DEBUG , this . component ) )
515
+ ( this . established && this . mongoLogger ?. willLog ( SeverityLevel . DEBUG , MongoLoggableComponent . COMMAND ) )
517
516
) {
518
517
if ( error . name === 'MongoWriteConcernError' ) {
519
518
this . emitAndLogCommand (
0 commit comments