gRPC tracing on Android

Viewed 211

I am trying to see detailed logs from gRPC to troubleshoot an issue I'm having as described here

However, I can't get it to work on Android. I have tried adding this in my Application.onCreate:

Os.setenv("GRPC_TRACE", "all", true)
Os.setenv("GRPC_VERBOSITY", "DEBUG", true)
1 Answers

gRPC on Android is provided by the grpc-java project, which does not look at those environment variables. The page you linked is for gRPC C-core, which has wrappers for a few languages (C++, Python, PHP, a few others), but not Java/Android.

For Java, I believe you can change the default logging level in your logging.properties file, something like:

handlers=java.util.logging.ConsoleHandler
io.grpc.level=FINEST
java.util.logging.ConsoleHandler.level=FINEST
Related