File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ can be set.
42
42
- ` subchannel_internals ` - Traces HTTP/2 session state. Includes per-call logs.
43
43
- ` channel_stacktrace ` - Traces channel construction events with stack traces.
44
44
- ` keepalive ` - Traces gRPC keepalive pings
45
- - ` index ` - Traces module loading
46
45
- ` outlier_detection ` - Traces outlier detection events
47
46
48
47
The following tracers are added by the ` @grpc/grpc-js-xds ` library:
@@ -62,4 +61,4 @@ can be set.
62
61
- DEBUG - log all gRPC messages
63
62
- INFO - log INFO and ERROR message
64
63
- ERROR - log only errors (default)
65
- - NONE - won't log any
64
+ - NONE - won't log any
Original file line number Diff line number Diff line change @@ -273,14 +273,7 @@ import * as load_balancer_outlier_detection from './load-balancer-outlier-detect
273
273
import * as channelz from './channelz' ;
274
274
import { Deadline } from './deadline' ;
275
275
276
- const clientVersion = require ( '../../package.json' ) . version ;
277
-
278
276
( ( ) => {
279
- logging . trace (
280
- LogVerbosity . DEBUG ,
281
- 'index' ,
282
- 'Loading @grpc/grpc-js version ' + clientVersion
283
- ) ;
284
277
resolver_dns . setup ( ) ;
285
278
resolver_uds . setup ( ) ;
286
279
resolver_ip . setup ( ) ;
Original file line number Diff line number Diff line change 16
16
*/
17
17
18
18
import { LogVerbosity } from './constants' ;
19
+ import { pid } from 'process' ;
20
+
21
+ const clientVersion = require ( '../../package.json' ) . version ;
19
22
20
23
const DEFAULT_LOGGER : Partial < Console > = {
21
24
error : ( message ?: any , ...optionalParams : any [ ] ) => {
@@ -109,7 +112,7 @@ export function trace(
109
112
text : string
110
113
) : void {
111
114
if ( isTracerEnabled ( tracer ) ) {
112
- log ( severity , new Date ( ) . toISOString ( ) + ' | ' + tracer + ' | ' + text ) ;
115
+ log ( severity , new Date ( ) . toISOString ( ) + ' | v' + clientVersion + ' ' + pid + ' | ' + tracer + ' | ' + text ) ;
113
116
}
114
117
}
115
118
You can’t perform that action at this time.
0 commit comments