dice icon indicating copy to clipboard operation
dice copied to clipboard

Setup Zap logger

Open JyotinderSingh opened this issue 1 year ago • 15 comments

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

JyotinderSingh avatar Aug 27 '24 12:08 JyotinderSingh

Hello @JyotinderSingh! I would like to work on this

Dev79844 avatar Aug 27 '24 12:08 Dev79844

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

soumya-codes avatar Aug 27 '24 12:08 soumya-codes

Sure

Dev79844 avatar Aug 27 '24 12:08 Dev79844

@Dev79844 thanks...

soumya-codes avatar Aug 27 '24 12:08 soumya-codes

zerolog is best

icetech233 avatar Aug 29 '24 02:08 icetech233

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

soumya-codes avatar Aug 29 '24 07:08 soumya-codes

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.

yashs360 avatar Aug 30 '24 12:08 yashs360

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

the most fast

icetech233 avatar Sep 02 '24 08:09 icetech233

zerolog

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

icetech233 avatar Sep 02 '24 08:09 icetech233

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.

AshwinKul28 avatar Sep 02 '24 22:09 AshwinKul28

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

sbshah97 avatar Sep 09 '24 12:09 sbshah97

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

aashraybhandar1 avatar Sep 11 '24 16:09 aashraybhandar1

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

pr2897 avatar Sep 12 '24 04:09 pr2897

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

I believe @AshwinKul28 is already tackling this

JyotinderSingh avatar Sep 12 '24 05:09 JyotinderSingh

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

lucifercr07 avatar Sep 14 '24 10:09 lucifercr07

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

AshwinKul28 avatar Sep 18 '24 20:09 AshwinKul28