Skip to content

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

Open
@ramnad-motorq

Description

@ramnad-motorq

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")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions