Comments (5)
@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.
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.
@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.
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.
After 1.0.0-rc. (#28) this seems to be fixed.
from zapr.
Related Issues (20)
- Package name is documented as `zapr` but is actually `zaplogr` HOT 2
- Tag a new release HOT 1
- Wrong line reported
- WithName and WithValues should preserve log level HOT 1
- "stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error HOT 3
- How to configured this to log to stdout, not stderr like bizarre Golang standard HOT 1
- Re-pin to a newer zap version
- Bump github.com/go-logr/logr v1.0.0-rc1 => v1.0.0 ?
- Incorrect number of arguments detected HOT 2
- Allow mapping between logr V() and zap log levels HOT 7
- panic messages use keys with spaces HOT 14
- DisableCaller in Zap Config HOT 1
- Why doesn't support semver spec to latest tag? HOT 4
- inconsistent logging of value vs. value embedded somewhere else HOT 2
- warn about malformed parameters HOT 1
- Logr to Zap Level Confusion HOT 3
- Data race in WithName() implementation? HOT 6
- use zap.Inline instead of allocating []zap.Field HOT 1
- Wrong line reported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zapr.