I want zerolog to support stateful log sampling that can be attached to a logger before events are emitted.
I want zerolog to support stateful log sampling that can be attached to a logger before events are emitted.: a task in MiMo-V2.6-RL-oss: Agentic RL Environments (MiMo RL release). The API should include type Sampler interface { Sample(Level) bool }, func (l Logger) Sample(s Sampler) Logger, and…
The task
The API should include type Sampler interface { Sample(Level) bool }, func (l Logger) Sample(s Sampler) Logger, and the global convenience func Sample(s zerolog.Sampler) zerolog.Logger in the github.com/rs/zerolog/log package. A sampled logger should apply its sampler after…
Part of XiaomiMiMo/MiMo-V2.6-RL-oss.