DiceDB / dice

DiceDB is a redis-compliant, in-memory, real-time, and reactive database optimized for modern hardware and for building and scaling truly real-time applications.
https://dicedb.io/
Other
6.65k stars 1.06k forks source link

Setup Zap logger #414

Closed JyotinderSingh closed 1 month ago

JyotinderSingh commented 2 months ago

We should replace the current logger ("github.com/charmbracelet/log") with Zap for better performance.

Dev79844 commented 2 months ago

Hello @JyotinderSingh! I would like to work on this

soumya-codes commented 2 months ago

@Dev79844 I have already written a variant for it. If it's ok, can i take this up?

Dev79844 commented 2 months ago

Sure

soumya-codes commented 2 months ago

@Dev79844 thanks...

icetech233 commented 2 months ago

zerolog is best

soumya-codes commented 2 months ago

@icetech233 would love to hear more on this. Why do you think zerolog is best?

yashs360 commented 2 months ago

Should be easy to benchmark this (zap vs zerolog vs others)? Or refer to an existing benchmark.

Also, i have closed a task to unify logging so please include that in scope once we have decided on the logging lib.

icetech233 commented 2 months ago

@icetech233 would love to hear more on this. Why do you think zerolog is best?

the most fast

icetech233 commented 2 months ago

zerolog

Benchmarks https://github.com/rs/zerolog

AshwinKul28 commented 2 months ago

I have been using zerolog from a long time. And yes it has a performance advantage mentioned in these benchmarks . In our last discussion I missed to mention this @soumya-codes . We can actually go with the zerolog instead of zap.

sbshah97 commented 1 month ago

Why not just go ahead with slog?

This is a nice talk which the Go team gave about logging in Go https://youtu.be/8rnI2xLrdeM?si=bllbR3HBMi9sUJbw

aashraybhandar1 commented 1 month ago

Hey guys is there a consensus on this? And is anybody looking to pick it up? If not I would like to pick it up

pr2897 commented 1 month ago

@AshwinKul28 @JyotinderSingh can I go ahead with zerolag? I want to pick it up.

JyotinderSingh commented 1 month ago

@AshwinKul28 @JyotinderSingh can I go ahead with zerolag? I want to pick it up.

I believe @AshwinKul28 is already tackling this

lucifercr07 commented 1 month ago

@kaviisuri thanks for contributing, can you please comment once so I can assign. cc: @AshwinKul28

AshwinKul28 commented 1 month ago

This can be closed since there's similar effort going on here - https://github.com/DiceDB/dice/issues/587