Skip to content

How to use zap in gin? #4179

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

Open
ashish111333 opened this issue Mar 11, 2025 · 1 comment
Open

How to use zap in gin? #4179

ashish111333 opened this issue Mar 11, 2025 · 1 comment

Comments

@ashish111333
Copy link

I have to log some operations inside gin handlers but sometimes I get interleaved logs ? I am not sure how to use zap...for proper sequential logs.

@abolfazlalz
Copy link

Use the gin-contrib/zap middleware for proper Zap integration with Gin. It handles request-scoped logging and prevents interleaved logs.

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

No branches or pull requests

2 participants