uber-go / zap

Blazing fast, structured, leveled logging in Go.
https://pkg.go.dev/go.uber.org/zap
MIT License
22.09k stars 1.44k forks source link

exp: zapslog / replaceattr support #1468

Open alok87 opened 2 weeks ago

alok87 commented 2 weeks ago

Is your feature request related to a problem? Please describe. Its a request for extending zapslog

Describe the solution you'd like Extend to support using packages for masking centrally so that using packages like this becomes possible https://github.com/m-mizutani/masq

alok87 commented 2 weeks ago

replaceAttr injection helps

// apply replaceAttr if defined (this will mask)
        if h.replaceAttr != nil {
            attr = h.replaceAttr(h.groups, attr)
        }