Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zapgrpc implements Experimental grpclog.DepthLoggerV2 #1267

Open
forsaken628 opened this issue Apr 5, 2023 · 1 comment
Open

zapgrpc implements Experimental grpclog.DepthLoggerV2 #1267

forsaken628 opened this issue Apr 5, 2023 · 1 comment

Comments

@forsaken628
Copy link

forsaken628 commented Apr 5, 2023

Is your feature request related to a problem? Please describe.

grpc log caller incorrect

Describe the solution you'd like
A clear and concise description of what you want to happen.

zapgrpc implements Experimental grpclog.DepthLoggerV2

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Is this a breaking change?
We do not accept breaking changes to the existing API. Please consider if your proposed solution is backwards compatible. If not, we can help you make it backwards compatible, but this must be considered when we consider new features.

no

Additional context
Add any other context or screenshots about the feature request here.

github.com/grpc-ecosystem/go-grpc-middleware/logging/zap.zapGrpcLoggerV2 has been removed in go-grpc-middleware/v2 version

@yurishkuro
Copy link

possible workaround:

	grpclog.SetLoggerV2(zapgrpc.NewLogger(
		logger.WithOptions(
			zap.AddCallerSkip(5), // ensure the actual caller:lineNo is shown
		)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants