File tree 1 file changed +12
-10
lines changed
1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import {
31
31
getDefaultAuthority ,
32
32
mapUriDefaultScheme ,
33
33
} from './resolver' ;
34
- import { trace } from './logging' ;
34
+ import { trace , isTracerEnabled } from './logging' ;
35
35
import { SubchannelAddress } from './subchannel-address' ;
36
36
import { mapProxyName } from './http_proxy' ;
37
37
import { GrpcUri , parseUri , uriToString } from './uri-parser' ;
@@ -424,15 +424,17 @@ export class InternalChannel {
424
424
JSON . stringify ( options , undefined , 2 )
425
425
) ;
426
426
const error = new Error ( ) ;
427
- trace (
428
- LogVerbosity . DEBUG ,
429
- 'channel_stacktrace' ,
430
- '(' +
431
- this . channelzRef . id +
432
- ') ' +
433
- 'Channel constructed \n' +
434
- error . stack ?. substring ( error . stack . indexOf ( '\n' ) + 1 )
435
- ) ;
427
+ if ( isTracerEnabled ( 'channel_stacktrace' ) ) {
428
+ trace (
429
+ LogVerbosity . DEBUG ,
430
+ 'channel_stacktrace' ,
431
+ '(' +
432
+ this . channelzRef . id +
433
+ ') ' +
434
+ 'Channel constructed \n' +
435
+ error . stack ?. substring ( error . stack . indexOf ( '\n' ) + 1 )
436
+ ) ;
437
+ }
436
438
this . lastActivityTimestamp = new Date ( ) ;
437
439
}
438
440
You can’t perform that action at this time.
0 commit comments