GithubHelp home page GithubHelp logo

Comments (5)

shawn-hurley avatar shawn-hurley commented on July 22, 2024

@DirectXMan12 This is due to sampling I believe. We worked around this the operator-sdk by forcing a user who goes below the debug level for zap to turn off sampling.

I could submit a PR here if that logic makes sense to you.

from zapr.

DirectXMan12 avatar DirectXMan12 commented on July 22, 2024

We could do that. Might want to rethink our levels and/or get a fix into Zap too -- IIRC, something in the Zap docs said you were allowed to do levels lower than debug, but I can't seem to find it now.

from zapr.

dbenque avatar dbenque commented on July 22, 2024

@DirectXMan12 This is due to sampling I believe. We worked around this the operator-sdk by forcing a user who goes below the debug level for zap to turn off sampling.

I could submit a PR here if that logic makes sense to you.

My understanding is that this logic would work only if the log level is static (don't change after initial config).
For example on my side I am using https://github.com/uber-go/zap/blob/master/http_handler.go#L39
And the sampler is created (or not) at logger creation.
Would be good if the sampler could be protected against panic.

from zapr.

DirectXMan12 avatar DirectXMan12 commented on July 22, 2024

Yeah, it's mainly due to how we map numbers to log levels. We talked to the zap folks at some point IIRC, and they weren't super-enthused about custom log levels existing and mostly considered what we're doing to be a bit of a hack (see uber-go/zap#713). I'm not quite sure what we want to do.

from zapr.

thockin avatar thockin commented on July 22, 2024

After 1.0.0-rc. (#28) this seems to be fixed.

from zapr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.