grpc-ecosystem / go-grpc-middleware

Golang gRPC Middlewares: interceptor chaining, auth, logging, retries and more.
Apache License 2.0
6.26k stars 690 forks source link

add doc for disabling log opts #680

Closed coleenquadros closed 10 months ago

coleenquadros commented 10 months ago

Added usage example for disable log options. The following keys are default in the log and only these can be disabled -

   SystemTag = []string{"protocol", "grpc"}
ComponentFieldKey    = "grpc.component"
ServiceFieldKey      = "grpc.service"
MethodFieldKey       = "grpc.method"
MethodTypeFieldKey   = "grpc.method_type"

Usage example - WithDisableLoggingFields(logging.MethodFieldKey, logging.MethodTypeFieldKey)

https://github.com/grpc-ecosystem/go-grpc-middleware/issues/679

Changes

Verification

coleenquadros commented 10 months ago

@johanbrandhorst

johanbrandhorst commented 10 months ago

Thanks a lot for this!!