zap
zap copied to clipboard
Blazing fast, structured, leveled logging in Go.
Hello, I just switched to zap as the main logging library for my project, and I was trying to make it log to a custom `io.Writer`. For the purpose of...
zap does not have a log level of "Notice". https://pkg.go.dev/go.uber.org/zap#pkg-constants However, this does not comply with Syslog severity standards. https://en.wikipedia.org/wiki/Syslog#Severity_level Many other products such as Datadog and Cloud logging are...
Per #999, it appears that Zap, or at least zap.Config does not yet support Windows. I suspect that besides filepath munging, we should work on WIndows just fine. Opening this...
I have this: ```go func getLogger() (*zap.Logger, error) { dir, err := os.Executable() if err != nil { panic(err) } fullpath := filepath.Join(filepath.Dir(dir), "proxy.log") cfg := zap.NewProductionConfig() cfg.OutputPaths = []string{...
See: https://github.com/uber-go/zap/issues/680
This change allows to configure how binary fields are serialized by `Encoder`. It is backward compatible and defaults to base64 encoding. Closes #730
#### Added + TOML tags to `Config`, `SamplingConfig`, and `zapcore.EncoderConfig`. + Example test in `example_test.go` which introduces a test-dependency on `github.com/BurntSushi/toml` for decoding TOML info a `Config` struct. See also:...
add new Option `HooksWithFields`. It's similar with `Hooks`, but let hooks can access fields. fully backward compatible.
As suggested in #530, adding a FAQ entry about prettifying JSON log lines with [zap-pretty](https://github.com/maoueh/zap-pretty). Don't hesitate if it's too much or if some changes are needed.