codeword/vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/settable/doc.go
2024-08-27 22:09:10 +03:00

17 lines
515 B
Go

//
/*
grpc_logsettable contains a thread-safe wrapper around grpc-logging
infrastructure.
The go-grpc assumes that logger can be only configured once as the `SetLoggerV2`
method is:
```Not mutex-protected, should be called before any gRPC functions.```
This package allows to supply parent logger once ("before any grpc"), but
later change underlying implementation in thread-safe way when needed.
It's in particular useful for testing, where each testcase might need its own
logger.
*/
package grpc_logsettable