When creating a GRPC client in NodeJS, if I'm using the grpc
package, I can start my program with the GRPC_VERBOSITY
set to debug
environmental variable.
$ GRPC_VERBOSITY=debug node index.js
and I'll get a ton of information about the network communication that's happening.
However, if I switch out implementations and use the @grpc/grpc-js
package, GRPC_VERBOSITY=debug
has no effect.
I've poked at the underlying typescript that implements @grpc/grpc-js
, and I see what look like logging calls.
So my question: How can I enable logging when using the @grpc/grpc-js
NPM package with NodeJS
As can be seen here:
Set
GRPC_VERBOSITY=DEBUG
in uppercaseAlso, according to this, you have to set
GRPC_TRACE
to specify what kind of logs you want to see. To see all logs, you can set it toall
.So, In your case, the command becomes