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

Question: Using Dict Inside an Array would not put back the byte buffer back into pool, is this the expectation? #681

Open
ramnad-motorq opened this issue Jul 13, 2024 · 0 comments

Comments

@ramnad-motorq
Copy link

If I try to run this program after instrumenting calls to eventPool.New and putEvent, I see that we won't put back the Dict created back into the eventPool.

We do use putEvent, if a Dict is applied directly to an Event.

I am new to this library and am trying to understand its implementation, so my question is if I am missing something here and this is actually the expectation?

package main

import (
	"github.com/rs/zerolog"
	"github.com/rs/zerolog/log"
)

func main() {
	log.Debug().Array("arr", zerolog.Arr().Dict(zerolog.Dict().Str("key", "value"))).Msg("arrayTest")
}
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

1 participant