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

Switch plain text logging to structured logging #933

Open
or-else opened this issue Dec 20, 2024 · 1 comment
Open

Switch plain text logging to structured logging #933

or-else opened this issue Dec 20, 2024 · 1 comment

Comments

@or-else
Copy link
Contributor

or-else commented Dec 20, 2024

Refactor code to use structured (and faster) logging for better integration with log analysis tools.
See https://github.com/rs/zerolog or https://github.com/uber-go/zap

Make it possible to remove / hide sensitive information from logs, such as authentication info.

@yinebebt
Copy link

According to benchmark tests zerolog performances better than zap. This performance improvement is achieved by avoiding memory allocations and reflections, similar to zap, but with additional optimizations; according to the zerolog README.

I found that while zerolog is minimal and efficient, I think it lacks some flexibility and introduces verbosity to achieve features beyond standard logging expectations. For example, features like stack traces and strongly typed fields require specific handling. Additionally, its chaining API style and field type definitions can make it feel less intuitive.

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

No branches or pull requests

2 participants