go-grpc-middleware
go-grpc-middleware copied to clipboard
I want to ignore some defult logged fields
I use github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors for add logging , but it came with different unnesesery fields like grpc.method_type i dont need thoose. So i forked repo and customize it. But i think we need option to ignore given fields with key.
What happened: ... message="started call" protocol=grpc grpc.component=server grpc.service=MockService grpc.method=GetUser grpc.method_type=unary peer.address=127.0.0.1:35722 grpc.start_time=2023-07-13T09:32:34Z grpc.time_ms=0.019
What you expected to happen: ... message="started call" grpc.method=GetUser
If accept the issue i can open pr for change the behavior.
Makes sense to me. Customization here would make sense. Perhaps option to specify fields to add would work (with default specifying all)