File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -108,10 +108,12 @@ export function trace(
108
108
tracer : string ,
109
109
text : string
110
110
) : void {
111
- if (
112
- ! disabledTracers . has ( tracer ) &&
113
- ( allEnabled || enabledTracers . has ( tracer ) )
114
- ) {
111
+ if ( isTracerEnabled ( tracer ) ) {
115
112
log ( severity , new Date ( ) . toISOString ( ) + ' | ' + tracer + ' | ' + text ) ;
116
113
}
117
114
}
115
+
116
+ export function isTracerEnabled ( tracer : string ) : boolean {
117
+ return ! disabledTracers . has ( tracer ) &&
118
+ ( allEnabled || enabledTracers . has ( tracer ) ) ;
119
+ }
Original file line number Diff line number Diff line change @@ -555,6 +555,24 @@ export class Subchannel {
555
555
( error as Error ) . message
556
556
) ;
557
557
} ) ;
558
+ if ( logging . isTracerEnabled ( TRACER_NAME ) ) {
559
+ session . on ( 'remoteSettings' , ( settings : http2 . Settings ) => {
560
+ this . trace (
561
+ 'new settings received' +
562
+ ( this . session !== session ? ' on the old connection' : '' ) +
563
+ ': ' +
564
+ JSON . stringify ( settings )
565
+ ) ;
566
+ } ) ;
567
+ session . on ( 'localSettings' , ( settings : http2 . Settings ) => {
568
+ this . trace (
569
+ 'local settings acknowledged by remote' +
570
+ ( this . session !== session ? ' on the old connection' : '' ) +
571
+ ': ' +
572
+ JSON . stringify ( settings )
573
+ ) ;
574
+ } ) ;
575
+ }
558
576
}
559
577
560
578
private startConnectingInternal ( ) {
You can’t perform that action at this time.
0 commit comments