0

I'm migrating from grpc.core to Grpc.AspNetCore. I've tried to set enviroment variables to get detailed logs but can't see any difference in the logs. Does Grpc.AspNetCore still uses enviroment variables like GRPC_TRACE or GRPC_VERBOSITY (see here the list of env variables) for logs? How can I set the verbosity of my logs in Grpc.AspNetCore?

For example, I'd like to see logs related to transport_security,tsi. I used to do the following in grpc.core:

$GrpcTrace = "transport_security,tsi"
$GrpcTraceVerbosity = "Debug"
[Environment]::SetEnvironmentVariable("GRPC_VERBOSITY", $GrpcTraceVerbosity, [System.EnvironmentVariableTarget]::Process)
[Environment]::SetEnvironmentVariable("GRPC_TRACE", $GrpcTrace -join ",", [System.EnvironmentVariableTarget]::Process)

I know that Grpc.AspNetCore uses Microsoft.Extensions.Logging for logging, but not sure if this means the env variables are no longer needed.

1 Answers1

0

I think you want the guidance provided here: https://learn.microsoft.com/en-us/aspnet/core/grpc/diagnostics?view=aspnetcore-6.0

Those variables work for a different project, the C-library with a C# wrapper. That C# library is in maintenance mode.

drfloob
  • 3,154
  • 1
  • 24
  • 31